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