Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #41393

Re: four-state checkbox?

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Arno Welzel <usenet@arnowelzel.de>
Newsgroups comp.lang.javascript
Subject Re: four-state checkbox?
Date Sun, 6 Aug 2023 13:50:56 +0200
Lines 31
Message-ID <kj9fp0Fkf52U3@mid.individual.net> (permalink)
References <37b72956-7171-4f6a-baf5-0bcdb2e151b5n@googlegroups.com> <25ca36ef-bfb8-4db3-8b69-f49d6d22d872n@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace individual.net 2XfIaX19OoJN5lVLFftvMQPrLjTCCH05/3Hmz4DqL6rh7ryLSk
Cancel-Lock sha1:gLphxksl5qKiQ15aQJvH48EcFjo= sha256:W3WV1l3PxqQrGnt7hpitOqvwGzYamkmHydeT1RviFwk=
Content-Language de-DE
In-Reply-To <25ca36ef-bfb8-4db3-8b69-f49d6d22d872n@googlegroups.com>
Xref csiph.com comp.lang.javascript:41393

Show key headers only | View raw


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 
>> { "&nbsp;", "&#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


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