Skip to main content
gamedev.net
🔒 Locked

display boolean state

Started by ChaosEngine 10 replies 1.3k views
Original Post
ChaosEngine
ChaosEngine
Hi all, this is more of a UI design question than an actual programming question. I need to display some readonly boolean state on a GUI. The first thing that comes to mind is a checkbox. However, a checkbox is an interactive control, (i.e. it's design more to accept input than show state), so I'm wondering if anyone can recommend a better widget to display state.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
Antheus
Antheus
Most widgets allow you to set the into read-only mode.
ChaosEngine
ChaosEngine
Thanks, Antheus, but that doesn't really answer my question. I could use a disabled checkbox or even derive a new checkbox type and add a readonly state, but my point is that I don't believe a checkbox is the right widget to display readonly boolean state. Even a disabled checkbox suggests that there should be something the user can do to edit this value.

I'm looking for a better way to convey readonly boolean state to the user (short of a label that says "1" or "0" [grin])
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
Simian Man
Simian Man
I would just use a descriptive static label. Like "lighting on" vs. "lighting off" or whatever.

What exactly does this state represent?
ChaosEngine
ChaosEngine
Quote:
Original post by Simian Man
I would just use a descriptive static label. Like "lighting on" vs. "lighting off" or whatever.

What exactly does this state represent?


This is more of a general query than a specific instance. Usually it's some server variable that the user has no control over, but needs to know (for example if something is in stock).

A descriptive label certainly conveys the info in a "readonly" way, but when looking at a dialog box (this is for a business app in my day job) a label doesn't really stand out.

Ah, I'm probably just being overly fussy.



if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
Dancin_Fool
Dancin_Fool
What about a little box displaying green or red, for true or false respectively.
swiftcoder
swiftcoder
Quote:
Original post by Dancin_Fool
What about a little box displaying green or red, for true or false respectively.


Obstifucation FTW!
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]
Obbedemus
Obbedemus
First thing that pops up in my mind is a radio button. Though most of these widgets are used for input, so secondly I thought of a green/red box.
( /)(O.o)(> <)This is Bunny. Copy him into your signature to help him on his way to world domination.
ChaosEngine
ChaosEngine
Quote:
Original post by Obbedemus
First thing that pops up in my mind is a radio button. Though most of these widgets are used for input, so secondly I thought of a green/red box.


Sorry, no cookie for you [smile]. The semantics of a radio button are choosing one option from many, not a boolean switch.

if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
Zahlman
Zahlman
Quote:
Original post by ChaosEngine
Quote:
Original post by Simian Man
I would just use a descriptive static label. Like "lighting on" vs. "lighting off" or whatever.

What exactly does this state represent?


This is more of a general query than a specific instance. Usually it's some server variable that the user has no control over, but needs to know (for example if something is in stock).


Reserve some space and show either a green checkmark or a red X icon.
ChaosEngine
ChaosEngine
Quote:
Original post by Zahlman
Quote:
Original post by ChaosEngine
Quote:
Original post by Simian Man
I would just use a descriptive static label. Like "lighting on" vs. "lighting off" or whatever.

What exactly does this state represent?


This is more of a general query than a specific instance. Usually it's some server variable that the user has no control over, but needs to know (for example if something is in stock).


Reserve some space and show either a green checkmark or a red X icon.


that sounds good, will give it a go.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
Obbedemus
Obbedemus
Quote:
Original post by ChaosEngine
Quote:
Original post by Obbedemus
First thing that pops up in my mind is a radio button. Though most of these widgets are used for input, so secondly I thought of a green/red box.


Sorry, no cookie for you [smile]. The semantics of a radio button are choosing one option from many, not a boolean switch.


Hey, now I think you're beeing a bit rushy. I know radios are for choosing, but if you only have on that is readonly and filled or not filled that can symbolize true/false. And my second alternative is more or less exactly what you decided upon. ^^
( /)(O.o)(> <)This is Bunny. Copy him into your signature to help him on his way to world domination.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.