Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/2/d43022721/htdocs/clickandbuilds/twmsblog/wp-content/themes/suffusion/functions/media.php on line 666

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/2/d43022721/htdocs/clickandbuilds/twmsblog/wp-content/themes/suffusion/functions/media.php on line 671

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/2/d43022721/htdocs/clickandbuilds/twmsblog/wp-content/themes/suffusion/functions/media.php on line 684

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/2/d43022721/htdocs/clickandbuilds/twmsblog/wp-content/themes/suffusion/functions/media.php on line 689

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/2/d43022721/htdocs/clickandbuilds/twmsblog/wp-content/themes/suffusion/functions/media.php on line 694
The annoying problem of the growing GExperts menu – twm's blog
Dec 252019
 

As I add new functionality to GExperts the menu it displays grows larger and larger. On small monitors (there are still computers with e.g. 1024×600 pixels screen size in use, usually not with the latest Delphi version though) this means that the menu has to be broken into chunks, each with a “more” entry at the end to display the next chunk.
While this has been implemented for years (decades actually) it didn’t work very well. For Delphi 6 the code was completely broken (I might have been the culprit myself) it still had some bugs with all later versions.

No more. Today I fixed those bugs and tested it with screens as small as 640×480 pixels.

Also, when moving the GExperts menu into the Tools menu, there was a problem that the maximum number of entries for a chunk was not calculated correctly which would mean that the “more” entry could end up outside the visible area. This has also been fixed.

Unfortunately this does not solve the underlying problem: The menu keeps growing. There are now a maximum of 45 + 3 Entries in that menu. The way that menu is created on demand, depending on which experts are enabled or not, does not lend itself to a sensible menu structure.

I have added a “Category” property to each expert, which so far is neither filled nor used anywhere. I plan to create only one entry per Category in the GExperts menu with sub menus for each category. Maybe I will even make those categories configurable. But that’s for another day.

 Posted by on 2019-12-25 at 18:34