SetLabel on GenButtons

Hello

I have an app with several GenBitmapTextButtons. Each time I click
one of the buttons I want to change the label on all the buttons.
I've tried calling SetLabel on each button but only the button I
clicked gets the new label. The other buttons don't get the new label
until I actually click them. Is there a way to force the buttons to
update their labels after I call SetLabel. I've tried calling
DrawLabel, but that doesn't seem to work. Is there a way to make this
work?

Dag

Thanks, that worked perfectly. Don't know why I didn't think about
calling Refresh. That seems to be the default solution to most gui
related problems...

Dag

ยทยทยท

On Tue, Jun 10, 2008 at 9:16 PM, Robin Dunn <robin@alldunn.com> wrote:

Mike Driscoll wrote:

Dag Wastberg wrote:

Hello

I have an app with several GenBitmapTextButtons. Each time I click
one of the buttons I want to change the label on all the buttons.
I've tried calling SetLabel on each button but only the button I
clicked gets the new label. The other buttons don't get the new label
until I actually click them. Is there a way to force the buttons to
update their labels after I call SetLabel. I've tried calling
DrawLabel, but that doesn't seem to work. Is there a way to make this
work?

Dag

If you drag another window across your application after running the
update, do you see the labels change? If so, then you probably need to call
self.Refresh(), with "self" usually being the frame. This will cause the
children of the frame to re-paint themselves, I think.

Or you can just call Refresh on each button as the label is changed. That
will reduce the amount that is redrawn to just that button instead of doing
everything in the whole frame.