OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: Fred Tomke on February 27, 2009, 01:44:11 AM

Title: Suggestion for readonly textboxes in tabs
Post by: Fred Tomke on February 27, 2009, 01:44:11 AM
Hello, I ask you for a suggestion about read-only textboxes. Please have a look at the screenshot I attached. There you can see many textboxes. If you should guess which of them are read-write and which are read-only you will have problems in deviding them from each other. But why they're white? The backgroundcolor is -6 as default. Read-only textboxes on forms use the same backcolor as the form behind. Tabs using VisualStyles are white in the backgound (using this style). I think that's the reason the textbox's back is white, too.

What do you suggest me to do if I don't want to disable using VisualStyles? Shall I change the forecolor of the text? But I was suggested not to override the defined styles of Windows. I there another idea?

Fred
Title: Re: Suggestion for readonly textboxes in tabs
Post by: jb on February 27, 2009, 06:18:33 AM
Label control?
Title: Re: Suggestion for readonly textboxes in tabs
Post by: Fred Tomke on February 27, 2009, 06:27:35 AM
Thanks jb, label control is not bad. But its backcolor is white, too. However, maybe I could make the text inside the control looking as grayed (to visualize that it is read-only). Which color is used for inactive captions?
I haven't got the right one yet.
Fred
Title: Re: Suggestion for readonly textboxes in tabs
Post by: jb on February 27, 2009, 07:18:07 AM
What's up with the rectangle captions?  Why are the backgrounds grey and not white?

say 60 - 70% grey for the read-only text would look good.
Title: Re: Suggestion for readonly textboxes in tabs
Post by: owenwengerd on February 27, 2009, 07:32:25 AM
I don't see that the read only property has any effect on the control's background. Is there some reason why you can't just disable (i.e. set Enabled to false) the read-only text box controls?
Title: Re: Suggestion for readonly textboxes in tabs
Post by: Fred Tomke on February 27, 2009, 10:22:21 AM
@Owen Yes, I will do that, thanks Owen.

@James: Yes you are right, it is worth to test. But in some forum messages Owen maked me thinking about user defined system colors and what will happen if I override this. But I think disabling single line textboxes will do that what I need.

Fred
Title: Re: Suggestion for readonly textboxes in tabs
Post by: jb on February 27, 2009, 10:48:46 AM
Sounds good.

Hey Owen, I can't remember when this changed but I use label controls to show the path of a drawing.  These paths are usually than the control is.  It used to be that hovering the mouse ofver the control brought up a rectangle "cloud" with the full text.  Doesn't do that now.  I know it worked in ObjectDCL.

Am I making sense?  It's Friday - and it's been a really long week . . ..

Title: Re: Suggestion for readonly textboxes in tabs
Post by: owenwengerd on February 27, 2009, 10:54:51 AM
Fred, I noticed that the ReadOnly.htm property description is wrong. Obviously I copied it from the AsReadOnly.htm page and never updated the copy. I have uploaded new files with a corrected ReadOnly.htm.
Title: Re: Suggestion for readonly textboxes in tabs
Post by: owenwengerd on February 27, 2009, 11:21:27 AM
jb, I took a quick look at the code for label controls, and I don't see anything that displays a tooltip. Maybe it was there at one point, but since removed. In any case, here are some suggestions:

1) Put in a feature request for this. I would say the proper solution should be to add a new property to the label called "Ellipsis Style", which can be set to "None", "Word", "End", or "Path", corresponding to control styles for the underlying Windows control (these styles automatically compact the displayed text). Then OpenDCL could display a tooltip with the complete path when "Ellipse Style" is set to something other than None *and* there is no tooltip defined for the control.

2) In the meantime, you could use a read only text box with border set to None and background set to -16 to emulate a label with tooltips, then set the ToolTip property to the complete path. (Hmm, I was surprised to see that labels don't have ToolTip properties in OpenDCL. I wonder why.)
Title: Re: Suggestion for readonly textboxes in tabs
Post by: jb on February 27, 2009, 11:26:36 AM
Owen:

1. will do

2.a good suggestion

2.b good question

ps

Everyone have a great weekend . . . and be safe!
Title: Re: Suggestion for readonly textboxes in tabs
Post by: Fred Tomke on February 27, 2009, 01:30:57 PM
Yes, have a nice weekend. Mine will start when the last method in the German documentation will be translated...  ;)

Fred