Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #41393
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: four-state checkbox? |
| Date | 2023-08-06 13:50 +0200 |
| Message-ID | <kj9fp0Fkf52U3@mid.individual.net> (permalink) |
| References | <37b72956-7171-4f6a-baf5-0bcdb2e151b5n@googlegroups.com> <25ca36ef-bfb8-4db3-8b69-f49d6d22d872n@googlegroups.com> |
luserdroog, 2023-08-05 14:55:
> On Thursday, August 3, 2023 at 10:04:58 AM UTC-5, luserdroog wrote:
>> I want to make a control that looks like a checkbox but cycles through
>> 4 states: { blank, checkmark, X-mark, questionmark }. What's the best
>> way to build such a thing. I'm thinking it wouldn't be too hard to make
>> a web component that just controls a span and flips through
>> { " ", "&#x...whatevers", ... "?" } strings.
>>
>> Is there an existing element that's closer, like an <option> I guess?
>
> Thanks Michael and Arno. Here's my idea for the interface a little more
> fleshed out:
>
> <click-box cycle
> states="empty checkmark xmark questionmark"
> empty=""
> checkmark="&x#..."
> xmark="&x#..."
> questionmark="?"></click-box>
Maybe you should consult this:
<https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements>
--
Arno Welzel
https://arnowelzel.de
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
four-state checkbox? luserdroog <luser.droog@gmail.com> - 2023-08-03 08:04 -0700
Re: four-state checkbox? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2023-08-03 14:46 -0700
Re: four-state checkbox? Arno Welzel <usenet@arnowelzel.de> - 2023-08-05 14:19 +0200
Re: four-state checkbox? The Natural Philosopher <tnp@invalid.invalid> - 2023-08-05 18:31 +0100
Re: four-state checkbox? Arno Welzel <usenet@arnowelzel.de> - 2023-08-06 13:47 +0200
Re: four-state checkbox? luserdroog <luser.droog@gmail.com> - 2023-08-05 05:55 -0700
Re: four-state checkbox? Arno Welzel <usenet@arnowelzel.de> - 2023-08-06 13:50 +0200
Re: four-state checkbox? JJ <jj4public@outlook.com> - 2023-08-07 12:04 +0700
Re: four-state checkbox? luserdroog <luser.droog@gmail.com> - 2023-08-07 07:56 -0700
csiph-web