I should have mentioned that I have various components like this and
that I have looked at other ways of handling this situation.  And by the
way...using a set or case statement is the best way to handle it's coding.
My reason for asking about this was not because I was stuck or anything but
because I wanted to get other people's ideas as to how they like to handle
such things...which I realize of course depends a lot on the type and style
of the rest of the interface! 
        In this particular case I really want to stay along the lines of a
speedbutton or something that looks like one, and I want the user to be able
to click thru the available choices.  A popup menu would be in my opinion,
very distracting here.  Plus, putting a popup menu on a button control
without a small down-facing arrow to let the user know one is available
isn't very good and in this case I have not enough room for a caption
w/arrow or even a glyph w/arrow.        The real question is whether to show
a glyph pointing to where they are currently or where they will go on the
next click of the button.  Both methods have their validity under certain
conditions, but I'm curious as to what you all think the typical users
consider right or "normal"!  Right now I'm leaning toward the current glyph
showing the current mode and the button's hint telling what the next
available mode is.  But since all four modes are more than evident visually,
I could even use just one glyph for all modes and just use the hint
property.  Another thought I had would be to use one general glyph but have
that that when rotated at each click visually denotes a change has taken
place...like perhaps with a pointer that starts out facing 0 degrees and on
the next click goes to 90, then 180, then 270, and finally back to 0 again.


from Robert Meek dba Tangentals Design


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Sean Mathews
Sent: Tuesday, January 03, 2006 4:04 PM
To: Delphi-Talk Discussion List
Subject: RE: Interface design

->      First the question:  Let's say that we have a TAction 
->setup named, "StyleAct" which will when executed set an 
->integer var to one of four possible values.  By default the 
->value is -1.  Then when executed the first time it sets the 
->value to 0, on the second execution the value is set to 1, 
->and finally on the third execution the value gets set to 2.  
->If executed again the value goes back to -1 and starts all over again.

Why not use an enumerated type here.  Such as:

TStyleAction = (saStateOne, saStateTwo, saStateThree, saStateFour);

Somewhere in the form code:

property Style : TStyleAction read FStyleAction write FStyleAction;
(Intentionally not using setter proc here).

Then when the button is clicked do 

If Style <> High(Style) then Style := Succ(Style) else Style :=
Low(Style);

->      Now my question has to do with the best way of 
->providing a means by which the user can select and set the 
->value he or she currently wants via the execution of this 
->TAction.  And in this particular case I chose a single button 
->on a toolbar which allows the user to click thru the four 
->settings in turn and then back to the first again.  And the 
->visual indication of this is provided by 4 different glyphs, 
->or as is the case here, by altering the TAction's ImageIndex 
->at each click of the button.  But should the glyph seen at 
->anytime reflect the current style that the interface is set 
->to OR should it reflect what the style will be IF the user 
->clicks it?  I've seen programs that use both methods, and 
->even a few poorly designed ones that use both in the same 
->application! <g>  But I'd like to hear what others think 
->about this and what they usually do or would do in this same 
->kind of situation.  I'd appreciate any comments on this at all!

I would use a drop down menu button that indicates it has a drop down
menu - ala little black down arrow(many free components available to do
this) with the menu items setting the relevant display style, and also
setting the button caption / glyph to something that represents the
current style.  If you use my suggestion above you can also change the
Style by doing something like:

Form.Style := TStyleAction(DropdownMenuItem.ItemIdex) if it has some
such property, or use the Tag property or something.
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to