[Gambas-user] Keeping a menu open?
Bruce Steers
bsteers4 at gmail.com
Mon Jan 17 21:09:57 CET 2022
even better...
$hPopup.W = $hGrid.Columns[0].W + $hGrid.Columns[1].W + ($hGrid.Padding *
3)
Is that what you mean?
Respects
BruceS
On Mon, 17 Jan 2022 at 20:02, Bruce Steers <bsteers4 at gmail.com> wrote:
>
>
> 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
>> rectangle.
>>
>> 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
>>
>> Regards
>> Gianluigi
>>
>
> You get the box dimensions in ThreeStateMenu_Draw()
> You get TextWidth()
>
> width should be something like..
> $hGrid.Padding + iBoxWidth + $hGrid.Padding + iTextLen + $hGrid.Padding
>
> Respects
> BruceS
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220117/1ba2bd2d/attachment.htm>
More information about the User
mailing list