JavaFX: Cross-Platform Button Resizing Issue [duplicate] - user-interface

If I make button relatively small, it's caption turns to ellipsis.
How to turn off this feature?

Don't let the button go below it's preferred size, then it will never need to elide the text of the button label:
button.setMinSize(Button.USE_PREF_SIZE, Button.USE_PREF_SIZE);
I want to make very small button
You can use any of the below either separately or in combination:
Apply CSS to use a very small font in the button.
Make the label text for the button very short.
Use brian's answer which proposes explicitly setting the ellipse string to empty.
Use a small graphic icon instead of text.
You can use setMinSize as documented above in all cases (if you wish the button not to go below a preferred size truncating or eliding content).
In all cases, if you wish, you can also apply CSS to minimize the padding between the label and button the border.
From your previous comment (I want to use simple captions like "<" and ">"), I think option 2 (Make the label text for the button very short) is what you want.
You may also be interested in Joel's Designing for People Who Have Better Things To Do With Their Lives which would indicate, usability-wise that very small buttons are usually a pretty bad idea.

in your label/button you can use the textOverrun property to turn off ellipsis.
textOverrun.set(OverrunStyle.CLIP);
this is probably a bit late for you, so i am putting it here for lone wanderers digging up this question.

It puts ... because there's no room for the text. You can use bigger buttons or a smaller font but if you really want the dots gone use button.setEllipsisString(""); , but then you just get truncated text.

Related

Why the text of a disabled NSButton (or NSButtonCell) is gray?

When i set a Button (NSButton) to be disabled, its text color changes to gray.
How can i modify this property? I want the text to stay black.
To answer your Title if not the body of the question: it's practically an industry standard to represent disabled screen elements this way, and probably what users expect.
To do something different might be confusing.
try setTitleColor:forState:, and pass UIControlStateDisabled for the last argument.

wpf: tabitem header to fit header.content size

I have a tab control and when there are too many itmes, I get tab item headers on multiple lines.
So it will be like
[TabItemAA1] [TabItemAA2]
[ TabItem3 ]
[TabItem4AAAAAAAAAAAAAAA]
I don't mind them stacking but when this happens, TabItem3's header stretchs to fit the width of tab control.
How can I prevent this or make the tab item content which is TextBlock to fit the extended width?
Thanks
That's kind of the way people expect to see it, though. The tab labels should be centered so you can easily read them. I assume you want to left or right justify instead. Changing the dominant UI paradigm is only a good idea if you're going to improve upon it.
It could get very messy, but you could nest another container inside the header and explicitly specify the size and alignment of the objects it contains.
For a different UI style where the tabs scroll horizontally instead of splitting into multiple lines, you could also check out this guy's article, titled "WPF Single Row Tab Control": http://rickdoes.net/post/2009/11/06/WPF-Single-Row-Tab-Control.aspx

How can I enhance the aesthetics of an ugly windows form packed with too many (necessary) features?

One of the window dialog of a software I'm working on looks a bit like this : (original screen-shot copied from this coding horror post, other examples available on this SO question)
The thing is that none of the options can be removed (those who can have already been), and that they must all be visible at a glance (i.e. no tabs allowed) Edit : I've added a comment explaining why tabs are not an option in my specific project.
I've tried to use colors, to add icons, but it just added to the overall feeling that someone had just dropped controls randomly using Visual Studio Form designer during a summer internship.
How can I make this dialog more user-friendly less horrifying without deleting features ?
Edit :
The GUI example I took has a lot of obvious design flaws (see those answers 1 2), but even after fixing those (which I've done on the software I'm working on), the dialog still looks pretty ugly.
Below is another example (credit). Controls are (almost) lined up correctly, appropriate controls are used, etc, but the overall result still looks terrible :
(source: judahhimango.com)
Given the constraints I think you won't have many options.
A good starting point would be to equal the alignments and control distances to increase overall symmetry with the ultimate goal to reduce visual clutter.
Examples:
The group boxes "Special" and "Running options" should have equal height.
The distances between the four buttons "Save settings" and "Exit" should be equal.
All buttons should have the same height, if possible avoid word wrapping.
Use the same height for all single-line edit boxes.
The quota label and its text field should be at the same baseline.
The distance between a group box caption and its first control should be equal (compare "Running options" to "Retrieval options")
Increase the distance between the controls in general, i.e. make the form look less dense.
Content fixes:
Use the same captions/names for the same things. For example, you use "Append to logfile" but "Overwrite Logfile
Use the same character case, sometimes it's "Only the first one", "Every Single Word" and sometimes "it is Camel-cased". Decide on one scheme and use it consequently (Sentence case and Title case are the most common)
Don't try to be cool, "Go 2 background" doesn't look very professional.
Avoid controls with unreadable shortcuts or no content at all. It doesn't help if the user has to stop on every control and think: "What does this thing do?"
Some more radical/controversal changes:
Try making the group boxes more symmetric, possibly be re-positioning them and use the same height. If necessary use two columns of checkboxes, that would still look better than uneven group boxes.
Unless it's absolutly necessary, remove the horizontal scroll bars from the two multiline edit boxes
Get rid of the "Clear" buttons. For the list box on the buttom left you have to provide some other way to delete items, perhaps make this into a multine text box, too.
Try replacing the checkbox collection with a checkable list box or a property grid.
A rule of thumb:
Imagine the lines of the bounding box of each control lengthed until it reaches the form boundary. The less different lines reach the boundary, the better. (Because correctly aligned controls produce more incident (-> less unique visible) lines)
On the use of colors and icons:
Simply adding icons and colors doesn't solve the fundamental problems such forms have. They all suffer from being overloaded with controls and adding even more only worsens the problem, because they just add more visual noise, but don't provide any more visual cues.
The problem with your examples, and the reason that they look cluttered is that there's not enough spacing between the elements. You think you're saving space by making things smaller, and putting them closer together, but it's a false economy because your eyes have to work harder to differentiate elements from eachother. Think about writing a computer vision program that had to OCR those interfaces, and the challenges you'd have just figuring out which element was which, let alone what the type says.
Regardless of what your programmer efficiency instincts might say.. it's okay to put space between your elements, and hell, it's okay to even have large amounts of completely "wasted" space too.
have a look at this
There's a clear boundary between the flower and its background. The shallow depth of field of the photography gives a clear contrast, and allows you to very rapidly construct a mental sillouette.
jungle http://www.statravelbuzz.co.uk/wp-content/jungle-taranaki-new-zealand.jpg
what's going on in this image? There's too much detail, and it's all over the place.
have a look here
http://www.papress.com/thinkingwithtype/text/line_spacing.htm
(source: papress.com)
think about what the line spacing is doing to your ability to distinguish words from eachother. What's it doing to the visual sense of clutteredness?
You can see from the type example that you don't have to give up much in terms of space efficiency to see massive gains in visual appearance.
grid systems
grid systems http://ecx.images-amazon.com/images/I/51kcWOOyUoL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_.jpg
thinking with type
other reccomendations:
stop stealing sheep
elements of typographic style
the design of everyday things
the humane interface
If you've already dealt with alignment and organizational aspects as much as you can, then your problem probably is the graphic design of the controls. Heavy 3-D controls in large numbers are detrimental to the aesthetics and usability of a window. Consider editing their properties to flatten and lighten the controls’ appearance, using something I call “compact presentation.” In addition to removing the ugliness and distraction of heavy borders and backgrounds, this also allows controls to be placed closer together, freeing white space for grouping them without resorting cluttering lines and frames.
It looks something like this (after also fixing alignment and redundancy along with a little re-arrangement of groups):
(source: zuschlogin.com)
If you're on WinForms, One trick I've found useful is to pack multiple-instance data in a DataGridView, and single-instance data in a PropertyGrid. Both these controls help you pack lots of information in very small space, and still give you full control over their visualization (you can add descriptions, tooltips, etc.)
The thing is that none of the options
can be removed (those who can have
already been), and that they must all
be visible at a glance (i.e. no tabs
allowed)
Sigh. I would argue that, because everything is visible at a glance, they practically become invisible in a sea of controls.
That being said, the ff (yes another list) are my suggestions:
To reduce clutter, make the overall form bigger, and all controls more widely spaced apart in all directions
Standardize the height of the controls, e.g., textboxes must all have same height, buttons all have same height, etc
Align labels with text boxes more consistently
Make the layout flow down instead: 1 column, with each group having the same width as all other groups
Set all group box names in bold to make them stand out
Put all those "wGetStart.bat" commands in a group of its own
If you really want to learn more about making it "flow", with or without getting rid of all this "visible" information, you might wanna get a copy of Steve Krug's Don't Make Me Think:
Because tabs are not allowed, you can create a more grid like layout.
Adding detachable panes for related options and commands can help the user to organise them, at least. If they can be minimised/unpinned when not needed, then they can also free up valuable screen estate and unclutter the UI. See VisualStudio itself for a nice implementation.
Here's my random selection of suggestions:
make it bigger, this allows a more structured grouping by reducing the space constraint on each group
add some structure by grouping options that the user might want to combine at the same time
add meaningful headers (might require the previous item). "special", "running options", "retrieval options" don't really convey any useful information.
make sure that only options that can be combines randomly are checkboxes (for example are "no info", "all info", "some info" really completely independent options? Same for "append to logfile", "overwrite logfile").
use appropriate controls (spinner for number entry, file selection dialog for files, radio buttons for mutually exclusive items, ...)
deactivate controls that make no sense with current configuration (for example custom directory text field).
move all actions to a single place
hide the scrollbars unless they are actually needed (i.e. reduce visual clutter)
be more consistent (why is it "running options" and "retrieval options" but not "special options"?)
One thing that you may have, but is obvious for the WGET example is the use of a main menu, e.g. File, Edit, Tools, Help. And also a button bar too?
First, define a hierarchy of control blocks. Even if everything must be visible, I think that some functions are more important than others. Also, make a clear separation between functions that apply to the domain (e.g., Start wGetStart.bat) and functions that apply to the software (e.g., Save settings).
Second, organize the layout according to this hierarchy: most essential to the top and to the left.
Third, let your design breathe. Space is fundamental for defining content.
Since no one has said this yet, I will: your window isn't really all that bad. Yes, it's ugly, and yes, I would be personally embarrassed to admit that I designed an interface that looks like that.
However, this window only produces a negative reaction the first few times you look at it. Once a user has used this form a couple of times, they will stop seeing it as a random collection of controls and instead start perceiving it as an interface that lets them see every piece of information that they require at a glance and that lets them do everything they need to do with a few mouse clicks.
It's a dialog for setting a bunch of options, and it's probably perfectly functional and not a big deal at all for your users. You could put a lot of work into some weird, fancy-schmantsy replacement UI that might impress the StackOverflow code-noscenti, but we don't pay your salary.
Now, the second window - that's a piece of crap.
Without knowing both the content your application and what it currently looks like, I can only guess at the problems you are facing, but here goes.
You say that this is being used by traders. While I have never dealt with that segment of the market I have often dealt with executives who need very specific information to run their businesses and the first cut of the application almost always looked like what you have displayed.
The original solution back in the day was to build a very light custom interface for each user of the application focusing on only the information relevant to that person. More recently the move has been toward making the interface customizable by the end user.
Chances are that none of your users are using all of the information presented to them. Each of them is using only a small subset. But each user is using a different subset. Try building the software so that each user can display only the information that they will be basing their decisions on.
Aside from other much-needed changed, adding a banner (displaying the company logo or something like that) seems to improve the overall appearance of the dialog.
I know it's a pure waste of space but it seems to improve the global feeling about the window.
alt text http://img24.imageshack.us/img24/3423/wget.jpg
Duplication - they might all have to be available instantly, but they could be available elsewhere as well. So you can have a keyboard accelerator, menu option, detachable panel, tabbed area ...
So this existing form could be the main, default interface (albeit improved with some of the other good design tips in other answers), but why not create an "expert" panel which can be a lot neater and try to work your users on to that, and away from this old "do everything" blotter.
I would really consider evaluating the usability goals of your project. Figure out what users want to do most frequently and most consistently with your application and default to that.
You should consider a wizard for this UI. Guide the user through a set of screens for the first use. And move many of these features as configurable options preferences.
Usability is not merely aesthetics IMHO. It is about making clear what the app is intending to do. I would refactor this app to provide shortcuts to common options patterns. If 90% of the time I am going to use a specific configuration of options why do I need to see every feature enumerated in the UI 100% of the time? It is just unnecessary clutter. Sensible defaults powerful configuration that is the goal. You don't have to sacrifice features, in a sense not making me think is a feature, perhaps the most important feature.
With respect to your specific app I would rework it with two basic screens a clean default screen and an advanced screen. Add the ability to create shortcuts to common configuration sets on the default screen. A simple button that maps to a specific configuration set and asks me for a url. And if the user needs to tweak an option present them with the advanced screen but treat it as preference configuration screen that saves the preference out to a shortcut button. If I want to use the configuration more than once let me save it as a custom bookmark or option on the defaults screen.
This is one of the things OS X does really well. There is a lot of power and customizability in OS X, "hidden features" if you will. But the OS defaults to sensible and straight forward options. Provide tools to the power users but don't clutter the system for the first time or casual user. This is not sacrificing functionality, it is effectively organizing functionality.
That is my first suggestion. But if absolutely don't want to hide options, I would make this a long scrollable vertical list organized in clear steps with explanation for each step:
Step 1: Provide URL ______________
Step 2: Configure Hosts _____________
Step 3: Configure Retrieval Options:
() option
() option
() option
() option
And so on...
At each step provide some context to the meaning of the configuration options.
The advantage to this is that you can clean up the UI aesthetically and provide useful configuration hints. I don't know what "Empty wGetStart.bat" means. I presume this empties a batch file of some sort. Provide me an explanation so that I know whether I want to click that button or not. And then let me hide explanations under a collapsible menu if I use the interface regularly.
My two cents.
This may not be appropriate, but...
Hide all the options in a stylesheet, much the way that all the paragraph formatting options are hidden in a word processor. Most of the time, the user just picks a named style. When the scary stuff is necessary, a click of an 'Advanced' button can grow the form to show all the options at a glance, to allow a few to be overridden, or to allow new named styles to be defined.
Obviously, a major advantage is that if there are a few particular configurations that are regularly used, it's trivial to switch between them and there's very little risk of accidentally setting one of the options wrong.
Another option - don't have all your options on display, use tabs or a wizard or whatever. Instead, have a text list of all options currently set (or all options in non-default states or whatever) to get the at-a-glance visibility.
These could be combined, so that your summary display says something like "like <style name>, except for ...", based on the style that's least different to the current options.
In a comment you say that a user "HAS to have all information available at once". Does that mean they have to see all the checkboxes and frames and scrollbars at once, or just the information?
For example, instead of having a multitude of checkboxes for option 1, option 2, option 3, etc, in the main GUI, only show the selected options and give the user a way to open a configuration window when they need to change something.
Instead of this:
+- Feature Set X - +
| |
| [x] option 1 |
| [x] option 2 |
| [ ] option 3 |
| [x] option 4 |
| |
+------------------+
show this:
feature set x: option 1, option 2, option 4 [configure...]
This lets the users see all the selected options without having to take up valuable real estate for all of the widgets necessary to change the values.
(apologies if the ascii art doesn't appear right -- it looks right in a fixed font :-\ )
An interesting article on this topic:
Managing UI Complexity by Brandon Walkin.
In the second example I would remove most of the arrows from the right hand side box. I would add the ability to click and drag to change the number(if your users are used to that I know several 3d packages that do it so it wouldn't be uncommon in relation to the example). You can change check boxes to buttons with backgrounds that change color or stay depressed when clicked as another option to reduce visual clutter.
In the right hand side box there are two or three separate functions mixed together that very well could get their own tab. When you are working with an object's color and texture you aren't going to be changing its size and view aspect ratio so having them right there means they are in the way. At the very list they need to be rearranged to be in some sort of logical order right now they are all over the place. Texture and color(things that effect color) should be together. Position rotation and view(things that effect shape\size) should be together.
It has already been said, but without seeing your application we can't give you a concrete answer on how to make your dialog less horrifying. If you can't post screenshots, then the best advice I can give is to hire a designer to help you work on the graphical end of your application; otherwise all you will get are general guidelines here.
Some things that might have not been discussed:
Think about the users of your applications and the systems that they run. I believe that most stock traders will have large dual monitor setups, so you can probably make your dialog larger and add space between your controls to make it look less cluttered. You should research your audience and see what they use.
Are you using the best controls for the job? In the first screenshot you posted I noticed a few controls that could be changed:
a. Under "Running Options" I see three checkbox options called All Info, No Info, Some Info. If only one can be selected at a time then maybe they could be changed into a drop down selection menu. Also under the same "Running Options" there is Append Logfile, Overwrite Logfile, which again you can convert to a drop down menu since you can select only one.
b. The two text fields where you can put in hosts, can probably be combined into one gridview with three columns. The first column is the host, the second is a checkbox for Accept, and the third is a checkbox for Reject.
By simply using different controls, we can still see everything we need but have less controls on the application.
Again, like I said above, witout seeing YOUR applications I can't really give you any specific suggestions.
Hope this helps.

How to implement (UI-wise) a button

I am designing the (G)UI of a program, and have stumbled across a problem; The program will convert a number into different units, and the layout of a unit been converted to is:
[Unit name (when clicked gives information)]
[Special status, if any]
[Output in textfield that can also be used for input (to convert to other units)]
I want the user to be able to copy an outputnumber onto the clipboard, without having to mess around with highlighting and finding the right buttons to press. So, I thought I'd make a button after the text-output field, saying something like "C" or "Copy".
But I was reading on joelonsoftware.com yesterday, and discovered that users seem to be cursorclumsy. So what should I do?
I've thought about a number of different options:
Click on textfield to copy to clipboard - BUT: I want to use it for input as well
Pressing a numeral on the keyboard to copy the respective one - BUT: There will probably be more than 10, and I need them for new input
Bigger Copy button, like on that actually says "Copy" - Hmm, would this work? I know that I like to use the keyboard when I can, so a solution involving it would be nice.
Each unit will have its own space, where everything (name, textfield etc.) fits in. What if it would copy to clipboard when clicked anywhere in that space except for on the name or textfield. - BUT: What if you miss, meaning to click below one textfield, and clicking above another?
But what about highlighting the unit's space as I went along? - Could still mean trouble...
What do you think? I think I just might opt for #3 - Bigger copy-button..
There's nothing wrong with a Copy button after every field if you feel that it's going to be a very common operation.
Two suggestions, however:
In terms of look and feel, make sure that the button is clearly associated with the field. For a text field, the best way to do this is to put the Copy button inside the text field (on the right side - but be prepared to handle RTL languages by switching its position as needed!).
To avoid making it overly big, don't use any text, but rather use the stock Windows icon for Copy (like this one: ), and put the text into its tooltip. If you do that, you may also get rid of button border entirely, further reducing its size, though you'd still want some visual hover indicator to make it clear that it's an active UI element. In fact, you might want to specifically copy Vista/Win7 Explorer (also seen in IE7/8) UI for location field and the Reload icon in it.
I think the solution #3 is the best in your list, but I would like to see a sketch of your GUI.
What ever you do, it is important to use the OS standard keyboard and mouse event bindings and preferable look-and-feel too otherwise users get confused.
For sheer speed, the keyboard is the way to go. How about letters A-Z to copy the text boxes instead? Skip “E” to allow scientific notation to be inputted. Potential speed is high, but learnability is low. I’d expect users will have a hard time figuring out this UI even with explanatory text on the page/window, and if users have to read explanatory text, then the time that takes will likely negate the time savings of the UI, unless the user is using the app all the time (Joel also writes correctly that users hate to read).
For an app that will be used only occasionally, the big button is a better choice, the bigger the better, as predicted by Fitts’s Law. And absolutely label it “Copy,” not “C” and not an icon, to maximize learnability. Your other ideas have learnability and tolerance issues without the speed of the keyboard.
That said, I think you’re taking what Joel says too far. Certainly you want to eliminate unnecessary clicks, but the typical design for this type of app would require one click on the text box (which should by default highlight the whole value) followed by one click on a Copy menu item –or better, Alt-C or Ctrl-C from the keyboard. It’s hard for me to imagine a task where saving one click or a couple keyboard presses would be worth the clutter of a bank of Copy buttons beside your text boxes. Are you also going to have buttons for Paste and Clear? At some point the clutter will slow your users down more than the extra click.
How often are users going to be copying? If it’s really dozens of times per session, then you should re-think the whole design approach because any copying and pasting of one number at a time is going to get tedious. Maybe you should support batch processing, taking multiple numbers at once and outputting results in a form already suitable for the expected use. Maybe have it work within other apps like the way Enso does: user highlights a number in any document or text field of any app, commands Convert - Feet - Meters and it’s changed in the document or field.
If you accidentally click on the wrong area, you could just click on the right area after that. If your issue lies in the user not knowing when they click on the wrong area, just highlight the last-clicked area.
Is there a problem with copying whatever is in the textfield when they click on it? So what if it's being used for input? They're just going to copy the value they need after they type values in.
You could also have a ctrl-click or shift-click in the text box be a copy.
Most people know how to copy text on their own computer. Perhaps the best solution is to just auto-highlight all the text in a textbox when it gets focus so they can just ctrl-c to copy or start typing to begin input.

Win32 List-View Control SubItem padding for custom-drawn SubItems?

When using custom-draw (NM_CUSTOMDRAW) to draw the entire contents of a ListView SubItem (in Report/Details view), it would be nice to be able to apply the same left and right
padding in my custom paint method that is applied by the control itself for non-custom-drawn items.
Is there a way to programmatically retrieve this padding value? Is it
related to the width of a particular character (" " or "w" or something?) or
is it a fixed value (6px on left and 3px on right or something) or...?
EDIT: To clarify, I want to add the same padding to my NM_CUSTOMDRAWn SubItems that the control adds to items that it draws, and the metric that I'm looking for, for example, is the white space between the beginning of the 2nd column and the word "Siamese" in the following screenshot (Note: screenshot from MSDN added to help explain my question):
(source: microsoft.com)
Note that the word "Siamese" is aligned with the header item ("Breed"). I would like to be able to guarantee the same alignment for custom-drawn items.
use ListView Header message HDM_GETBITMAPMARGIN
see link text
ListView_GetSubItemRect (LVM_GETSUBITEMTECT)
http://msdn.microsoft.com/en-us/library/ms930172.aspx
Despite what the documentation says I suspect LVIR_LABEL returns just the returns the bounding rectangle of the item text, as per ListView_GetItemRect.
(This just kept niggling me as I though I had actually seen an answer somewhere when playing with NM_CUSTOMDRAW).
Edit After Comment 2:
I imagine you have seen NMLVCUSTOMDRAW which if you are willing to use Version 6.0. has rcText. I wouldn't since I use Win2K.
Given what you have found I would go back to the suggestion of using
ListView_GetItemRect to get LVIR_LABEL and compare that with LVIR_BOUNDS and use the difference.
the way for doing this is retrieving the format of the corresponding column with
ListView_GetColumn()
then check the retrieved myLVCOLUMN.mask
LVCOLUMN myLVCOLUMN;
myLVCOLUMN.mask=LVCF_FMT;
ListView_GetColumn(hwnd,nCol,&myLVCOLUMN);
then when we draw the corresponding label belonging to that column
if(myLVCOLUMN.fmt & LVCFMT_CENTER)
DrawText(x,x,x,x, DT_CENTER | DT_WORD_ELLIPSIS );
else if (myLVCOLUMN.fmt & LVCFMT_RIGHT)
DrawText(x,x,x,x, DT_RIGHT | DT_WORD_ELLIPSIS );
else
DrawText(x,x,x,x, DT_LEFT | DT_WORD_ELLIPSIS );
I would assume that GetSystemMetrics() is that you need to look at. I think that SM_CXEDGE and SM_CYEDGE are probably the values you want, but don't quote me on that. ;-)
Can only guess without seeing your output.
A few suggestions: If you are using the DrawTextEx function, have you have experimented with DT_INTERNAL et al?
Are you accidentally putting in a blank image/icon.
Does it look ok in classic screen mode? If so I would look at XP Theme functions to see if some thing is going on.
Late edit after first comment:
I wonder if the size of rectangle matches the space required for the LVN_ENDLABELEDIT edit box around the text so the text doesn't move (or for a focus rectangle)?
I guess you could compare the result of LVM_GETITEMRECT with LVIR_LABEL on the first column and use the difference as your left border.

Resources