[Lazarus] New menu designer. which style do you prefer?

Ondrej Pokorny lazarus at kluug.net
Fri Jan 15 11:32:05 CET 2016


On 11.01.2016 21:36, Howard wrote:
> On 11/01/2016 16:07, Anthony Walter wrote:
>> Very nice. I like the new design.
>>
>> Side note: Who wrote that FScroller for the new menu editor? It acts 
>> very erratic for me on Gtk2. I don't know about on other widget sets. 
>> See issue 29369. Why not use TScrollBox or make TShadowMenu a 
>> TScrollingWinControl?
>
> I wrote it. It is definitely the weakest part of the new designer. I 
> hate to reinvent the wheel. However, I could not get a TScrollBox 
> container to work correctly for TShadowMenu, perhaps because its size 
> calculation and painting is rather non-standard. Whatever the reason I 
> was unable to get a TScrollBox container to respond correctly to 
> TShadowMenu size changes when there were more than a screenful of 
> menuitems.
> I'm honestly not sure if the best approach to sorting it out is to 
> mend (or rewrite) FScroller, or to figure out a way for TScrollBox to 
> parent TShadowMenu correctly. I did not try making TShadowMenu a 
> TScrollingWinControl descendant. Perhaps that would be a better 
> option. What would others advise?

What were your problems? In r51298 I removed all the Scroller code and 
simply used TScrollBox for TShadowMenu and it works without any problems 
- much better than your Scroller experiment. I tested win32 and Linux+Gtk2.

Ondrej




More information about the Lazarus mailing list