mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
I am trying to hide (or disable) a dialog tab, however:

Code:
did -h dialog index
seems to hide the entire tab set; and

Code:
did -b dialog index
seems to do nothing

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Tab sets as a whole are just a single dialog control, a parent container of the other controls within it. Tabs work by dynamically hiding and showing the individual controls for the associated "tab". When that parent "tab control" container is hidden, the whole thing goes away (Windows API style applied to a single Window Handle hWnd).

/did doesn't have the means to dynamically delete controls, nor does it appear to allow dynamic alteration (add/delete/hide/show) of tab control tabs, either. "Tab" isn't mentioned in /did at all; Support hasn't been added [yet].


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
I admit I was going on https://en.wikichip.org/wiki/mirc/dialog_components#Tab

What about disabling a tab?

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
You will have to experiment. I personally recommend keeping your dialogs simple and less glamorous. You can still disable and hide individual controls as you normally would. The best programmer will never need to disable or hide a control, because they'll find a less convoluted solution.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Originally Posted By: Raccoon
The best programmer will never need to disable or hide a control, because they'll find a less convoluted solution.

This is a rather strange statement. The "best" programmer optimizes UIs not for particular technical dogmas, but rather for the experience of the end user. Disabling and hiding controls are perfectly acceptable means for the latter goal.


Saturn, QuakeNet staff
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
I think that's the point I was driving at, though. Some of the worst user experiences are those by developers who hyper-dynamically modify the user interface to give an appearance of reactance and impressive complexity. Kind of like how TV shows add extraneous beeps and clicks when an actor uses a computer, to make it seem like it's "doing something."

A good experience is the opposite, the disuse, of these visual and auditory effects... and approaches perfection as such theatrics approaches zero. Simplicity.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
Originally Posted By: Raccoon
The best programmer will never need to disable or hide a control, because they'll find a less convoluted solution.


In this same dialog, I have primary checkboxes and subsidiary checkboxes that only make sense when the primary checkbox is checked. So when the primary checkbox is cleared I disable the subsidiary ones.

This is actually the least convoluted solution (for the user) and IMO good design and good programming.


Link Copied to Clipboard