FLTK logo

Re: Popup menus acting out

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Popup menus acting out Gonzalo Garramuño May 13, 2019  
 
El 13/5/19 a las 18:45, Gonzalo Garramu=C3=B1o escribi=C3=B3:
> I currently have two popup menus (Fl_Menu_Buttons) that have different=20
> things in them.=C2=A0 Both are created on the fly based on user input,=20
> using the add() function of the menus.=C2=A0 One of the menus calls popup=
()=20
> on it and waits for user action.=C2=A0 The other sits inactive until the=
=20
> user clicks on it (which in my case the user does not and it is not=20
> even displayed in the user interface).
> My problem is that the popup menu receives the text of the other menu=20
> (but not the action).=C2=A0 So, for example, File->Open is replaced by "R=
ed=20
> Channel" in the popup. Please note that this happens only when both=20
> menus get created (the popup is open and the other menu --the one with=20
> the channels-- is recreated on the fly).
> The only strange thing is that the second menu (the one with the=20
> channels) calls clear_submenu() and remove() when creating the menu in=20
> order to sort things out.
>
> I wonder if anybody has stumbled onto something similar and found a=20
> solution or can provide some hints on what to check to figure out=20
> what's acting out.
Well, I checked the addresses of the children of both Fl_Menu_Buttons=20
and they are the same.=C2=A0 So that explains why I get the text wrong.=C2=
=A0=20
However, it does not explain *what* causes them to be the same.

--=20
Gonzalo Garramu=C3=B1o

--=20
You received this message because you are subscribed to the Google Groups "=
fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/=
fltkgeneral/07f384fb-0770-61ed-def5-13dec55e173a%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.