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
Label control?
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
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.
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?
@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
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 . . ..
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.
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.)
Owen:
1. will do
2.a good suggestion
2.b good question
ps
Everyone have a great weekend . . . and be safe!
Yes, have a nice weekend. Mine will start when the last method in the German documentation will be translated... ;)
Fred