[fxruby-users] Show the Button

Meinrad Recheis meinrad.recheis at gmail.com
Thu Feb 16 17:47:11 EST 2006


tried recalc or forceRefresh on the toolbar?

On 2/16/06, Uwe Hartl <uwe.hartl at gmx.net> wrote:
>
> Hi,
>
> thanks for the help. I have one more question for today.
> $created containt the information if the App is created already. I took
> the
> toolbar code from the imageviewer-example to initialize the toolbar.
>
> If I add another button after the app is created, it does not show up. I
> have
> to resize the MainWindow to change the size of the toolbar, then it is
> shown.
> But the button.shown? prints "true". update and show do not show it. What
> do
> I do wrong? Here is the code:
>
>
>         def addToolBarButton(icon = nil, text = "Button", &command)
>                 if (!@toolBarButtons.has_key?(text))
>                         button = FXButton.new(@toolbar, text, icon)
>                         @toolBarButtons[text] = button
>                         button.connect(SEL_COMMAND) do yield end
>                         button.create if $created
>                         button.update
>                         p button.shown?.to_s
>                 else
>                         p "This Toolbar Button did exists already!"
>                 end
>         end
>
> Thanks
> Uwe
>
> --
> ***********************************************************************
> Uwe Hartl                                e-mail: Uwe.Hartl at gmx.net
> 91522 Ansbach                            Telephone: (0981) 9724526
> Am Mühlfeld 8                            Notfall-Mobil: (0160)90418680
> Germany
> ***********************************************************************
>
>
> _______________________________________________
> fxruby-users mailing list
> fxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060216/ac0677c1/attachment.htm


More information about the fxruby-users mailing list