[Gambas-user] Keeping a menu open?
bsteers4 at gmail.com
Mon Jan 17 21:02:07 CET 2022
On Mon, 17 Jan 2022 at 10:20, Gianluigi <bagonergi at gmail.com> wrote:
> Il giorno lun 17 gen 2022 alle ore 10:05 Gianluigi <bagonergi at gmail.com>
> ha scritto:
>> P.S. It is clear that I have not understood how the upstream distance is
>> calculated. ;-D
> Hi Benoit,
> can you kindly help me figure out how to calculate the width of the menu
> It seems to start after a Desktop.Scale + the width given by the menu item
> + What?
> My last attempt is this (see attached project):
> space = Desktop.Scale
> I add the first space + 2 spaces for each menu item, however the further I
> go the more the rectangle (and popup) moves to the right.
> Thanks for your attention
You get the box dimensions in ThreeStateMenu_Draw()
You get TextWidth()
width should be something like..
$hGrid.Padding + iBoxWidth + $hGrid.Padding + iTextLen + $hGrid.Padding
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User