Working through zetcodes wxwidget tutorial, events.

I think this will be my 102 posting… Wow what ride 😉
So yesterday, I was playing around in XP.. Today I’m back in Linux.

So…. I’ve been working in the events section of the zetcode tutorial called “Example using Connect”. I had convinced myself that there was a bug in this code because of a cryptic error message. It turns out that I missed copying over the semicolon at the end of class declaration. (That was sort of embarrassing to me so, I’m keeping that post private.) After all that I found the example to be sort of lame. The move event only kicks in when the frame is moved. I was sort of hoping to see the position update when the mouse moved across the frame. I tried to play with that a little. I’m not quite there yet. todo (figure out how to do that after getting through the tutorial). It’s sort of funny, apparently, this has been on my mind. I found another one of my todo’s when I was googling, looking for the same thing. I’ll get there..

The next section in the tutorial is event propagation. This is vaguely familiar but different. Skip event or something..
Lets see copying the code over and executing.
Ok… Main point here is to get an event to travel from button to panel to frame via the skip event.

The next text application in the tutorial is something called veto. This might be handy in a my bag of tricks. In this instance, a custom close event handler stops the closing of a frame and you given a message box with the option to quit with a yes/no.
Actually, it’s a nice little code section to create the equivalent of a vb msgbox.

After veto comes a nice little section about windows identifiers.
Main points from zetcode

Window identifiers are integers that uniquely determine the window identity in the event system. There are three ways to create window id’s.

* let the system automatically create an id
* use standard identifiers
* create your own id

Each widget has an id parameter. This is a unique number in the event system. If we work with multiple widgets, we must differantiate among them.

This is pretty much a rehash of stuff I’ve seen in the tutorial… Only thing is the mention of GetId() which gets you access to the window identifier (for example if the system assigned one)..

I must say this example looks might pretty in Linux.
Finally done with this section on to Dialogs…….

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *