Spin button inside a menu item
- From: Nix <nix go-nix ca>
- To: gtk-app-devel-list gnome org
- Subject: Spin button inside a menu item
- Date: Mon, 03 Nov 2003 15:46:25 -0700
Hi !
I would like to create a popup menu that looks like this:
...
menu items
...
Insert <spinbutton> elements
...
menu items
...
I can build it easily enough, but I cannot convince the menu widget to
give input focus to the spin button contained within it.
I would like the following behaviour:
- When I move the mouse over the spin button menu item, it gets
hilighted (normal menu behaviour).
- When the mouse enters the spin button, the hilight disappears, and the
spin button gets input focus. This allows me to click inside the
entry, type a number, click the up and down arrows, etc., without the
menu collapsing. At this point, the popup menu thinks the mouse is
not hovering over it at all - this is why none of the items are
hilighted.
- When the mouse leaves the spin button, the usual menu selection
resumes.
Here's the source code building the menu, a window to click to make it
pop up, and some futile efforts at handing focus to the spin button:
http://qcadesigner.ca/nix/gtk-menu.c
TIA for your advice !
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]