Suggestion for readonly textboxes in tabs

Started by Fred Tomke, February 27, 2009, 01:44:11 AM

Previous topic - Next topic

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

jb

James Buzbee
Managing Memeber
Black Horse Development, LLC

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

jb

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.
James Buzbee
Managing Memeber
Black Horse Development, LLC

owenwengerd

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?

Fred Tomke

@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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

jb

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 . . ..

James Buzbee
Managing Memeber
Black Horse Development, LLC

owenwengerd

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.

owenwengerd

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.)

jb

Owen:

1. will do

2.a good suggestion

2.b good question

ps

Everyone have a great weekend . . . and be safe!
James Buzbee
Managing Memeber
Black Horse Development, LLC

Fred Tomke

Yes, have a nice weekend. Mine will start when the last method in the German documentation will be translated...  ;)

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]