> I have a severe problem with Viewkit 1.2:
> I want to add a callback to a menu item for the enter and leave notify events.
> For now I forget about the events, and just retrieve some value from the
> resource file. This routine looks like:
> The problem is that _fileNewSessionButton->baseWidget() always returns NULL.
> My first guess was that it had to do with the fact that Viewkit menues are
> not build until needed. I tried to use menu()->build(*this), but the
> only result was I had no menubar at all!
menu and return the widget if necessary. But you can get what you want
1) Calling VkMenu::useWorkProcs(FALSE); before you create your windows.
This disables the delayed build of menus, so the widget will exist right
away, possibly at the cost (small) of some startup time.
2) Update to 6.2. The latest viewkit already supports what I think you
are doing. (Showing help text as the user moves over widgets).
Incidently, I'd use arm and disarm callbacks to detect the user entering
and leaving an item rather than event handlers. That way, gadgets will