2014-06-05 3 views

답변

0

예, 가능하며 다소 간단합니다.

두 개의 클라이언트 핸들러 (하나는 호버에 스타일을 설정하고 다른 하나는 다시 설정)를 작성해야합니다. 그런 다음 버튼에 다음과 같이 추가하십시오.

var btn = app.createButton('Button').setStyleAttributes({color:'blue'}); 
var setStyleHover = app.createClientHandler().forEventSource().setStyleAttributes({color:'red'}); 
var setStyleBack = app.createClientHandler().forEventSource().setStyleAttributes({color:'blue'}); 
btn.addMouseOverHandler(setStyleHover); 
btn.addMouseOutHandler(setStyleBack); 
//add button to your interface 
//show app 
+0

잘 작동합니다. 나는 그것을 변화시키기 위해서 함수를 통과시켜야한다고 생각했다. 고맙습니다. –