Effect of making a menuitem the Default item lazarus / 31-LCL ---------------------------------------------------------------------- howardpc · 2014-12-31 21:40 This is about several related questions to do with TMenuItem.Default. I cannot see that setting a TMenuItem.Default to True has any effect (other than emboldening the caption) on Windows. Is this the same for other widgetsets/OSs? Is the effect supposed to be that double-clicking a submenu executes the Default item and closes the menu? The LCL help says: "Default : is this option the default selection? If so, it usually appears in Bold and is selected by hitting ENTER" which is clearly wrong, since Enter executes the highlighted menu item (closing the menu) whether or not it is the Default. Why does the IDE let you set more than one Default property of the items in a submenu to True? Indeed, they can all be simultaneously True, which makes the property meaningless, even if it were to have some useful functionality. Does anyone know leading software that makes use of Default menu items to good effect? The Lazarus IDE does not have any Default items AFAICS. ---------------------------------------------------------------------- Blaazen · 2014-12-31 21:49 I just tested in D7 under Wine. It allows only one MenuItem with property Default=True. But I don't know what is purpose of this property. It does not anything as far as I can see. ---------------------------------------------------------------------- jwdietrich · 2015-01-01 00:15 I tested it with Mac OS X (Carbon widget set). Here the default property doesn't seem to have an effect, too (apart from drawing the respective menu item in bold). ---------------------------------------------------------------------- eric · 2015-01-01 07:19 Isn't the default item the one which is activated if you open the menu and hit Enter? ---------------------------------------------------------------------- jwdietrich · 2015-01-02 01:18 Quote from: eric on January 01, 2015, 08:19:06 amIsn't the default item the one which is activated if you open the menu and hit Enter? Well, at least on the Mac this doesn't seem to work. ---------------------------------------------------------------------- Bart · 2015-01-02 13:49 Found this: QuoteThe default property in a menu only states that if you double- click the parent MENU (!) this default submenu item will be executed. (Source) Bart ---------------------------------------------------------------------- Bart · 2015-01-03 16:15 I opened a bugreport about this.