widgets on WinCE/ARM4
Alicia da Conceicao
alicia454 at gmail.com
Sat Aug 26 03:14:47 PDT 2006
> my real question is this: i have the menus up and working on wince, but
> i need to add a toolbar. the application i'm running is a topograpical map,
> and so i need 6 icons: left, right, up, down, zoom in/out. the question is
> how do i attach this toolbar, and then associate functions with each of the
> elements/icons?
Dear Mickey:
Of course I remember you. Unfortunately I never liked the WX toolbar
implimentation. So unfortunately I am not familar with it, and would not
be able to help.
Instead, I created my own wxImageMap class which is derived from
wxStaticBitmap. For a psuedo-toolbar with you have 6 buttons, you
create 7 bitmap images of the toolbar. For each button, you define
its rectangular coordinates (x,y,w,h), a function pointer, and the bitmap
image of the toolbar with that button highlighted. The last (7th) bitmap
image is of the toolbar in its rest state with no images highlighted.
Whenever you mouseover or click on an button, the button should
highlight. If the image map has keyboard focus, you can also use the
arrow keys or PocketPC scroll wheel to select the desired button.
Then when you click on the button, the corresponding function is called.
I have tested my wxImageMap class on Win32, MacOSX, PocketPC
& Mobile5 & SmartPhone, Linux, and NetBSD, and it all works on these
platforms. Plus, as an image, you can place it anywhere in your
application. And it can be used for more complex layouts then toolbars.
Think of those flash menus on some webpages.
If you wish, I would be happy to send you a copy of my wxImageMap
class as opensource freeware, if you think it will help.
Or, I can send you a copy of one of my PocketPC apps that uses it,
if you wish to try it out.
Yours truly,
Alicia.
More information about the wx-users
mailing list