On Sat, Feb 14, 2009 at 03:41:40PM +0000, corvid wrote:
Jorge wrote:
On Sat, Feb 14, 2009 at 03:13:03AM +0000, corvid wrote:
I've had this kicking around in my tree for months...finally got around to implementing the max string width for OptionMenu and doing a little polishing.
Here it treats optgroup, option, and /optgroup as types of options because when I tried keeping options inside optgroup structures, it turned out to be messier. The idea is that if this is accepted, I will later do some renaming.
It looks good so far. Please set the itemGroup position relative to its parent widget and not to cursor.
I'm not sure what you mean by this.
Currently, the item group positions itself relative to the selected item and the cursor. This is: the selected item is drawn under the mouse pointer, and the rest of the widget adjusted around. This is confusing (especially when one is drawn over the other). This is a FLTK feature that can be disabled. The idea is to have the parent menu drawn just under the selection widget, like here: [Option 1 v] .-------------. | Group1 >| | Group2 >| | Group3 >|.----------. '-------------'| Opt1 G3 | |=Opt2=G3==| <- Selected option | Opt3 G3 | '----------' Note 1: in this case a click with the mouse pointer over the "[Option 1 v]" widget is necessary to display the menus, but they draw relative to the parent ("[Option 1 v]") instead of making the selected option appear under the mouse pointer. Note 2: Firefox does an "incorrect" rendering according to this page: http://www.tantek.com/HTML4/OPTGROUP.html -- Cheers Jorge.-