| Author |
Message |
neoWave
Joined: 18 Sep 2005 Posts: 9 Location: Netherlands
|
| Posted: Sun Mar 12, 2006 - 8:14 am Post subject: How to add a separator to a widget menu? |
|
|
Hey,
I'm making a search widget that has a pop-up menu where you can select the search engine of your choice.
I was wondering if it's possible to add "real" separators to that menu like the ones found throughout Mac OS X.
Basically I want it to look like this:
Search Engine A
Search Engine B
Search Engine C
Search Engine D
-------------
Search All
Pic of the separators used in Mac OS X, and the ones I would like to implement in my widget's pop-up menu.
Thanks in advance. |
|
| |
|
| |
daylate

Joined: 19 Jun 2005 Posts: 18
|
| Posted: Tue Mar 14, 2006 - 2:01 am Post subject: |
|
|
According to this list of fixes for WebKit:
http://webkit.opendarwin.org/blog/?p=32
| Quote: | | Menu separator support: an <hr> inside a <select> with size 1 will now add a horizontal separator in the menu. |
This works for me:
| Code: | <select>
<option>Search Engine A</option>
<option>Search Engine B</option>
<hr />
<option>Search All</option>
</select>
|
Note that you can add a separator dynamically in the same way you add "option" elements dynamically (although I'm too lazy to look that up right now). |
|
| |
|
| |
neoWave
Joined: 18 Sep 2005 Posts: 9 Location: Netherlands
|
| Posted: Tue Mar 14, 2006 - 7:06 am Post subject: |
|
|
| Thanks man, worked like a charm! |
|
| |
|
| |
robotspacer

Joined: 09 Jun 2005 Posts: 21 Location: United States
|
|
| |
|
| |