Hi, wxruby users!
I wrote today:
> ... [skip]. Can anybody explain why the status bar flickers at the
> top (!) of the frame when I resize the frame and how to avoid this?
> (the following code is the simplest example)
>
> #-----------------------------------
> require ''wxruby''
> include Wx
>
> class RbApp < App
> def on_init
> frame = MyFrame.new("Test status bar flicker")
> frame.show(TRUE)
> end
> end
>
> class MyFrame < Frame
> def initialize(title)
> super( nil,-1,title, DEFAULT_POSITION, DEFAULT_SIZE,
> DEFAULT_FRAME_STYLE | CLIP_CHILDREN | NO_FULL_REPAINT_ON_RESIZE )
>
> @status_bar = create_status_bar(3)
> set_status_bar( @status_bar )
> end
> end
>
> a = RbApp.new
> a.main_loop
> #-------------------------------------
It seems that the problem is in the function create_status_bar().
To avoid this flicker of the status bar under the frame''s title
one can use:
@status_bar = StatusBar.new(self, -1)
@status_bar.set_fields_count( 3 )
set_status_bar( @status_bar )
instead of:
@status_bar = create_status_bar(3)
( of course, "set_status_bar( @status_bar )" in my first message
is absolutely unnecessary after "@status_bar = create_status_bar(3)"
)
Could anybody say why create_status_bar() causes this flicker ?
--
Best regards,
Pavel
mailto:papushev@inp.nsk.su