PDA

View Full Version : How to make Ellipsis work for Path in text area



slalande50
11-12-2008, 03:46 PM
I have created a dialog with a Text Area and a Browse button.

The Browse button opens the Windows browse dialog, which I can retrieve a file and a path that the user will have selected, which I can display in a Text Area. But my problem is that if a user select a path that is too long to be displayed in the text Area. some data will be lost and it is not user friendly. So I would like to display something similar as the SdAskDestPath which display ellipsis if the path is longer than the Text Area.

So I have tried several thing but indeed, it didn't work. I have notice that for a Text Area, a Window Styles can be configured which is SS_PATHELLIPSIS. Reading on this configuration, the path if too long should display ellipsis in order to shorten the path. It should look similar too this:
c:\\dir1\dir2\...\file.txt

But after several attempt I am clueless of what is actually going wrong. Something that should be pretty easy is pretty confusing.

Could someone help me please. Is the text area suppose to support ellipsis. And is it suppose to be configured "No Text Wrap" to false or true.

slalande50
11-13-2008, 08:24 AM
I forgot to mention that the text is displayed when I do a CtrlSetText. My project is an InstallScript MSI Project.

thanks in advance.

slalande50
11-13-2008, 01:44 PM
I finally found it. the option WS_GROUP has to be checked else the Ellipsis option does not work. Unbelievable that no documentation on this. I don't know if it is Windows or InstallShield that should be blamed for this but I am really not impress.