List Info

Thread: Text of Status Bar always disappear




Text of Status Bar always disappear
user name
2007-05-01 05:34:14
The first time I create the status bar by call
 ; sb = create_status_bar
  sb.set_status_text('Welcome to use Code Line Statistics')
it works perfect. But when I click a tool bar button that trigger an event, and call
  sb.set_status_text('Finish')
if the mouse is on the button, the text of status bar is "Finish"; but once the mouse is out of the button, the text of status bar becomes empty.
It's too strange

--
flyerhzmhotmail.com">flyerhzmhotmail.com
Re: Text of Status Bar always disappear
country flaguser name
United States
2007-05-04 18:31:31
huang zhimin wrote:
> The first time I create the status bar by call
>   sb = create_status_bar
>   sb.set_status_text('Welcome to use Code Line
Statistics')
> it works perfect. But when I click a tool bar button
that trigger an 
> event, and call
>   sb.set_status_text('Finish')
> if the mouse is on the button, the text of status bar
is "Finish"; but 
> once the mouse is out of the button, the text of status
bar becomes empty.
Could you show us a bit more code? I added the following in
the 
minimal.rb sample but it seems to work as I'd expect

    sb = create_status_bar(2)
    sb.set_status_text("Welcome to wxRuby!")

    button = Wx::Button.new(self, -1, 'Press me')
    evt_button(button.get_id) { sb.set_status_text('Pressed') }

alex

_______________________________________________
wxruby-users mailing list
wxruby-usersrubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/wxruby-users

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )