[wxPython] Posting a WM_COMMAND message to wxPython Frame

Hi,

I'm new to this list, so sorry if I've missed the answer to this question
which appeared in February:

Kevin Gill wrote:

> I can not get the application to receive the event. It appears that the
messages are dropped by wxWindows before they get to my frame. > > In the

Python code I have an EVT_COMMAND() line and a handler. > In the DLL, I
have a PostMessage() call.
Robin Dunn replied
Take a look in wxWindows/src/msw/window.cpp in wxWindowMSW::UnpackCommand
and wxWindowMSW::HandleCommand for info on how the WM_COMMAND message is
turned into an event. If the window you are sending the message to is a
wxFrame then you'll also want to look at wxFrame::HandleCommand in
wxWindows/src/msw/frame.cpp. If all else fails then ask about this on
wx-dev.

I have tried for a few days to solve this problem without any positive
results. Does anyone have any suggestions? I'm starting to get a bit
desperate!

Thanks in hope

Ian

Kevin Gill wrote:
> > I can not get the application to receive the event. It appears that

the

> messages are dropped by wxWindows before they get to my frame. > > In

the

Python code I have an EVT_COMMAND() line and a handler. > In the DLL, I
have a PostMessage() call.
Robin Dunn replied
Take a look in wxWindows/src/msw/window.cpp in wxWindowMSW::UnpackCommand
and wxWindowMSW::HandleCommand for info on how the WM_COMMAND message is
turned into an event. If the window you are sending the message to is a
wxFrame then you'll also want to look at wxFrame::HandleCommand in
wxWindows/src/msw/frame.cpp. If all else fails then ask about this on
wx-dev.

I have tried for a few days to solve this problem without any positive
results. Does anyone have any suggestions? I'm starting to get a bit
desperate!

What have you tried that doesn't work? What exactly are you wanting to do?

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

Thanks Robin for the last reply re the no border on the static text box. Hey,
I've learnt enough in the last 2 weeks to I think write my class to do that.

I'm still frustrated by my inability to get either a completely flat text box
or a borderless text box

Is there anyway this can be acheived by deriving a new class or something?

Thanks

I'm still frustrated by my inability to get either a completely flat text

box

or a borderless text box

Is there anyway this can be acheived by deriving a new class or something?

I assume you mean the wxTextCtrl? If the native control always uses the 3D
border then there is probably no way to make it flat in wxPython.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

I don't understand re the native control. I do note that one can have a
borderless textbox in qtDesigner however. I guess that must use its own
wigits?

···

On Wednesday 05 June 2002 3:45 pm, you wrote:

> I'm still frustrated by my inability to get either a completely flat text

box

> or a borderless text box
>
> Is there anyway this can be acheived by deriving a new class or
> something?

I assume you mean the wxTextCtrl? If the native control always uses the 3D
border then there is probably no way to make it flat in wxPython.

I don't understand re the native control. I do note that one can have a
borderless textbox in qtDesigner however. I guess that must use its own
wigits?

Correct. Qt uses, well... the Qt widgets. wxGTK uses gtk+. They're both a
set of widgets and etc. built on top of the X library.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

Is there any way those in control of GTK could be pursuaded to have a
property on their text box wigit that allows no border?

···

On Thursday 06 June 2002 1:08 am, you wrote:

> I don't understand re the native control. I do note that one can have a
> borderless textbox in qtDesigner however. I guess that must use its own
> wigits?

Correct. Qt uses, well... the Qt widgets. wxGTK uses gtk+. They're both
a set of widgets and etc. built on top of the X library.

richard terry wrote:

Thanks Robin for the last reply re the no border on the static text box. Hey,
I've learnt enough in the last 2 weeks to I think write my class to do that.

I'm still frustrated by my inability to get either a completely flat text box
or a borderless text box

Is there anyway this can be acheived by deriving a new class or something?

Probably, but you might ask yourself why. The Philosophy of wxWindows is
to use the underlying toolkit where possible, so that the resulting app
looks totally native. If all GTK apps have text boxes with borders, why
should yours have something different?

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Probably, but you might ask yourself why. The Philosophy of wxWindows is
to use the underlying toolkit where possible, so that the resulting app
looks totally native. If all GTK apps have text boxes with borders, why
should yours have something different?

Because it all boils down to how nice you want your GUI to look. There are
times that having a bordered 3d text box is the way to go, and time when the
3d borders make the design look clunky and visually confusing to the user.
Some time in the future when I've time I'll send you two screen dumps of the
same design using both philosophies and let you see the difference. In some
screens it is impossible to avoid a certain degree of 'business'. In these,
just the addition of a few more grey shadows around things can make the
visual impact awful.

Regards