GUI design question
-
Hi all, I have a dialog which has a static textbox that says "The file c:\foo\bar.txt cannot be loaded. You must decide what to do now." and a few buttons beside the textbox to present the user with the choices. There is no problem with the dialog except when the pathname is really long (i.e. 4095 characters long), then the textbox cannot include the whole sentence. What do I do? I have think of a few ways already but these won't fix the problem: 1. Use a messagebox(but I need more buttons than just OK and Cancel) 2. Use a ellipsize function. (but I want to present the user with the full filename, that's the whole point of having another dialog box) 3. Use "Resizing text to fit in rect" in an earlier article by Jason Phillips. (but this will result in some really ugly code and break a lot of other codes) What I'm thinking of is, is there some GUI design techniques that will solve this common problem of long filename? Thanks in advance.
-
Hi all, I have a dialog which has a static textbox that says "The file c:\foo\bar.txt cannot be loaded. You must decide what to do now." and a few buttons beside the textbox to present the user with the choices. There is no problem with the dialog except when the pathname is really long (i.e. 4095 characters long), then the textbox cannot include the whole sentence. What do I do? I have think of a few ways already but these won't fix the problem: 1. Use a messagebox(but I need more buttons than just OK and Cancel) 2. Use a ellipsize function. (but I want to present the user with the full filename, that's the whole point of having another dialog box) 3. Use "Resizing text to fit in rect" in an earlier article by Jason Phillips. (but this will result in some really ugly code and break a lot of other codes) What I'm thinking of is, is there some GUI design techniques that will solve this common problem of long filename? Thanks in advance.
Instead of a static text box, I recommend you use a "Read-Only" edit box. This will still chop off the name when it's long, but at least the user will be able to scroll through it with the cursor and even copy it to the clipboard if he/she wants. Regards, Alvaro
-
Instead of a static text box, I recommend you use a "Read-Only" edit box. This will still chop off the name when it's long, but at least the user will be able to scroll through it with the cursor and even copy it to the clipboard if he/she wants. Regards, Alvaro
Dear eng, I agree; a read-only edit box is the way to go. Also, you can turn on its "Word-Wrap" style simply by turning of the Auto HScroll and Horizontal Scroll styles. Then make it so that it looks like a listbox (as in area), so that the filename will wrap and add a Vertical Scroll bar (but turn off Auto VScroll) so theu user can scroll the text. They also get a context menu that they can use to copy text to the cliboard with! Yours, Brian Hart
-
Dear eng, I agree; a read-only edit box is the way to go. Also, you can turn on its "Word-Wrap" style simply by turning of the Auto HScroll and Horizontal Scroll styles. Then make it so that it looks like a listbox (as in area), so that the filename will wrap and add a Vertical Scroll bar (but turn off Auto VScroll) so theu user can scroll the text. They also get a context menu that they can use to copy text to the cliboard with! Yours, Brian Hart
What about using the ellipsize function, and using a multiline tooltip (http://www.codeproject.com/miscctrl/tooltipex.asp) to display the full path if the user needs it. It's an option...
-
Hi all, I have a dialog which has a static textbox that says "The file c:\foo\bar.txt cannot be loaded. You must decide what to do now." and a few buttons beside the textbox to present the user with the choices. There is no problem with the dialog except when the pathname is really long (i.e. 4095 characters long), then the textbox cannot include the whole sentence. What do I do? I have think of a few ways already but these won't fix the problem: 1. Use a messagebox(but I need more buttons than just OK and Cancel) 2. Use a ellipsize function. (but I want to present the user with the full filename, that's the whole point of having another dialog box) 3. Use "Resizing text to fit in rect" in an earlier article by Jason Phillips. (but this will result in some really ugly code and break a lot of other codes) What I'm thinking of is, is there some GUI design techniques that will solve this common problem of long filename? Thanks in advance.
-
What about using the ellipsize function, and using a multiline tooltip (http://www.codeproject.com/miscctrl/tooltipex.asp) to display the full path if the user needs it. It's an option...
Dude, make it multi line text. use \n inside the text string to tell the static control to show the text in the next line. Also you need to increase the width of the control in order to see the rest of the lines. I hope this helps. vance http://upside.hypermart.net