Aleksa
Aleksa

Reputation: 3104

Button isnt greyed out when disabled

I have one button and when user clicks it I catch an event and in the handler function I call Disable() function on that button but it isnt greyed out... Only if I click on some other widget after that, button becomes greyed out... Anyone knows what could be the problem?

Upvotes: 1

Views: 1026

Answers (1)

FogleBird
FogleBird

Reputation: 76762

Sounds strange. Try one of these...

  • Use wx.CallAfter(button.Disable) instead of button.Disable().
  • Call button.Refresh() after disabling it.

Upvotes: 2

Related Questions