SelectWidget: adding separator lines

29 views
Skip to first unread message

Charlie Veniot

unread,
Mar 30, 2023, 5:30:47 PM3/30/23
to TiddlyWiki
This works with my Chrome web browser.  I don't know about other web browsers.



```
<$select tiddler='$:/SiteTitle' tooltip='Choose a new site title'>
<option>A Tale of Two Cities</option>
<hr>
<option>A New Kind of Science</option>
<option value disabled>—————————————</option>
<option>The Dice Man</option>
</$select>
```

Charlie Veniot

unread,
Mar 30, 2023, 5:40:14 PM3/30/23
to TiddlyWiki
I found a unicode character that gives nicer results:

```
<option disabled>─────────────────────────────</option>
```

Charlie Veniot

unread,
Mar 30, 2023, 5:43:13 PM3/30/23
to TiddlyWiki
Screenshot 2023-03-30 6.41.32 PM - Display 2.png

Charlie Veniot

unread,
Apr 1, 2023, 10:44:35 PM4/1/23
to TiddlyWiki
Since I'm finding myself using this separator in many places, it made sense to macrofy the thing:

```
\define selectOptionSeparator() <option disabled>─────────────────────────────</option>
```

Example:

```
<<selectOptionSeparator>>
<option value={{🥇 Acknowledgements!!title}}>🥇 Acknowledgements</option>
<option value={{❤ Support This Project!!title}}>❤ Support This Project</option>
```

Reply all
Reply to author
Forward
0 new messages