nend Posted January 25, 2020 Share Posted January 25, 2020 (edited) Is it possible to get the width of a context menu before showing it. I need it to aligned right widht the end of the window. The text in the menu is multi language and there for not possible to set the width in the code. The first image is how I get it and the second is how I want it to have it. I think It is possible but I can't find a way to do it, I've search more than 40 min on google but no luck I hoop some one has a good idea. Edited January 25, 2020 by nend Link to comment Share on other sites More sharing options...
argumentum Posted January 25, 2020 Share Posted January 25, 2020 Create it outside the monitor ( say, -100,-100 ) and measure it. Then, any time you call it, since is going to be the same size, and the size is already known, position it accordingly.( just an idea but w/o coding it I would not know. Just an idea ) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Deye Posted January 25, 2020 Share Posted January 25, 2020 (edited) Or find a way to change the style to allow aligning the context menu to the "Right" side (from button) depending what the main window has their Better yet Post a reproducer to tell what option are available Edited January 25, 2020 by Deye Musashi, argumentum and nend 3 Link to comment Share on other sites More sharing options...
nend Posted January 25, 2020 Author Share Posted January 25, 2020 @Deye Thanks when you mention to change the style that made me to find the solution. I'd use _GUICtrlMenu_TrackPopupMenu with $iAlignX set to "2" argumentum 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now