2014-03-26 4 views
0

버튼을 눌렀지만 버튼 해제가 작동하지 않으면 이벤트가 실행될 수 있습니다.버튼 릴리스 이벤트가 Kivy에서 작동하지 않습니다.

Button: 
    id: my_custom_label 
    text: 'SOS' 
    height: "95dp" 
    width: "160dp" 
    on_press: app.sendprogress() # this is working 
    on_release : app.sendhelp() # this is not working 
    size_hint: None, None 
    pos_hint: {'center_x': .1, 'center_y': .1} 
    canvas.before: 
     PushMatrix 
     Rotate: 
      angle: 0 
      origin: self.center 
    canvas.after: 
     PopMatrix 

내가보고하고 오류가 이것이다 : 즉, 대신 on_release : app.sendhelp()on_release: app.sendhelp()을 수행

32:    on_press: app.sendprogress() 
>> 33:    on_release : app.sendhelp() 
34:    size_hint: None, None 
35:  pos_hint: {'center_x': .1, 'center_y': .1} 
... 
Invalid property name 
+0

'sendhelp()'메소드를 볼 수 있습니까? – IanAuld

답변

3

는 콜론 앞의 공간을 제거하려고 여기 내 .kv 코드입니다. 나는 네가 거기에 공간을 가질 수 없다고 생각한다.

+0

고맙습니다. 나는 공백이 허용되지 않는다는 것을 알지 못했고 논리적 인 실수를 생각하고있었습니다. –

관련 문제