|
From: Dave R. <dav...@ma...> - 2002-04-28 21:46:13
|
I agree, it's not the best way to go, but the question has come up again
for another reason now.
if I have an object derived from Wx::Frame which contains a
Wx::SplitterWindow, the splitter is correctly sized inside the frame
upon window resize. however, if i trap the frame resize using
EVT_SIZE(), the default splitter resizing doesn't happen.
how can I trap the event for notification purposes, yet call the default
behaviour first?
sub OnSize {
my ($self,$event) = @_;
# call default behaviour
$event->Handle();
# respond to resize
$self->DoOtherStuffWhenResized();
}
thanks,
/dave
On Wednesday, July 24, 2002, at 04:14 , Mattia Barbon wrote:
> On Wed, 24 Apr 2002, Dave Roe wrote:
>
>> I would like to perform some custom painting on a sub-classed window.
>> I've derived a class called MyNotebook, inheriting from Wx::Notebook. I
>> can define an OnPaint handler with EVT_PAINT(), but how do I "invoke"
>> the event, so that the notebook's paint handler is called, before I
>> start to draw on top of that?
> I don't think this is a good way to do what you want to do, whatever it
> is.
>
> If you want to drwa in the client area of the notebook, you should put
> a Wx::Panel inside the notebook, If you want to draw outside the client
> area (inside the tabs), drawing inside native controls like this is
> dangerous (i.e. may fail in strange ways in different platforms, even
> if it works on platform X). If you really want ot do the latter, you
> should probably not use EVT_PAINT, and do the drawing in idle time.
>
> HTH
> Mattia
>
>
-------------------------------- 8< --------------------------------
pls note - new contact details:
email: dav...@ma...
phone: (650) 906 3497
dav...@em... is still a valid email address
|