Command1/Text1 Enabled = False - not the expected behaviour
Hey everybody,
when setting
the caption is not greyed out!
It just does not look right at runtime.
It is fine at designtime though.
does not seem to change anything.
It should be greyed out and locked!
Dani
when setting
|
|
Jabaco Source |
1 |
Command1.Enabled = False
|
the caption is not greyed out!
It just does not look right at runtime.
It is fine at designtime though.
|
|
Jabaco Source |
1 |
Text1.enabled = False
|
does not seem to change anything.
It should be greyed out and locked!
Dani
RE: Command1/Text1 Enabled = False - not the expected behaviour
when setting
![]()
Jabaco Source
1Command1.Enabled = False
the caption is not greyed out!
It just does not look right at runtime.
It is fine at designtime though.
Disable the CommandButton works fine for me.I have no problems with enable and disable it.
Thanks for the info.
Quoted
![]()
Jabaco Source
1Text1.enabled = False
does not seem to change anything.
It should be greyed out and locked!
Bug is now fixed:
[ http://code.google.com/p/jabacoframework/source/detail?r=87 ]
[ Jabaco-rev87.jar ]
Greatings
theuserbl
Thanks a lot theuserbl,
for constantly updating the framework
I still did not give it a try myselfe
the problem I am facing here:
is not a malfunction. It is the looks! In my LAF environment the disabled Command Botton changes to the disabled look
BUT it's caption stays black (the 'enabled = True' appearence)!
Here is a picture of what I mean:
In the background you can see what it looks like at designtime and what it should look like at runtime.
Thanks again,
Dani
for constantly updating the framework
I still did not give it a try myselfe
the problem I am facing here:
Quoted
when setting
![]()
Jabaco Source
1Command1.Enabled = False
the caption is not greyed out!
It just does not look right at runtime.
It is fine at designtime though.
is not a malfunction. It is the looks! In my LAF environment the disabled Command Botton changes to the disabled look
BUT it's caption stays black (the 'enabled = True' appearence)!
Here is a picture of what I mean:
In the background you can see what it looks like at designtime and what it should look like at runtime.
Thanks again,
Dani
Is it wrong?is not a malfunction. It is the looks! In my LAF environment the disabled Command Botton changes to the disabled look BUT it's caption stays black (the 'enabled = True' appearence)!
I can change it, but I think it is the normal Java SystemLookAndFeel for Windows. So it should like to look like WindowsXP disable-buttons.
The program at runtime looks also as WinXP and that in the designmode as Win2k.
If you want, you can also at runtime use an different LookAndFeel.
For example go click on the right top tree on "Project" and then in the Properties where "JVM Options" stand write
|
|
Source code |
1 |
-Dswing.systemlaf=javax.swing.plaf.metal.MetalLookAndFeel |
|
|
Source code |
1 |
-Dswing.systemlaf=com.sun.java.swing.plaf.motif.MotifLookAndFeel |
|
|
Source code |
1 |
-Dswing.systemlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel |
Greatings
theuserbl
Hmmm.. have again looked at it.
The Caption color is set with ForeColor:
So I have to say, what an disabled button have to look like.
How solved VB6 this problem?
I can mix the ForeColor with white or black or gray. Or set it per default to gray. And which gray color? #808080 ?
Don't know.
Or is it better to input a new Property called ForeColorDisabled or so?
And hopw to call it? ForeColorDisabled? DisabledForeColor ? ForeDisabledColor ? DisabledColor ?
Greatings
theuserbl
The Caption color is set with ForeColor:
|
|
Source code |
1 |
Command1.ForeColor |
So I have to say, what an disabled button have to look like.
How solved VB6 this problem?
I can mix the ForeColor with white or black or gray. Or set it per default to gray. And which gray color? #808080 ?
Don't know.
Or is it better to input a new Property called ForeColorDisabled or so?
And hopw to call it? ForeColorDisabled? DisabledForeColor ? ForeDisabledColor ? DisabledColor ?
Greatings
theuserbl
What you are saying makes sense!
All the controls that have a caption their ForeColor stays black when enabled = False.
So I guess it is meant to be that way. It just did not look right to me.
Kind of like I could push it but then I can't!
Oh well...
VB6 it is the way I described it. The color is &H80000010& on my system and I would probably call it ForeColorDisabled.
But now I don't know if it really makes sense to add a property. You would have to do thid fr the other controls too.
I was not aware of the possibility to use different LookAndFeel options. Very interesting and a bit scary ...
Its not easy to predict the outcome.
Do you know if there is any Mac OS LAF to be able to simulate the LookAndFeel outcome of the Mac on my development environment?
The Tabstrip for example behaves different on the Mac.
Personally I would rather like to see energy spent on other things:
It would be great to be able to add an image to the JBGrid header to accomplish a ColSortIndicator. (Or maybe even only the possibility to change the BackColor of a single ColumnHeader)
I know we can use the Jtable directly. Still it would be nice.
The Jtable ColSortIndicator is bound to the AutoSort property. Since I am sorting the underlying SQL it would be nice to be able to set a ColSortIndicator(Up/Down) with a simple property.
I don't know Java well enough to do this myself. But this would definitely be a nice feature.
Dani
All the controls that have a caption their ForeColor stays black when enabled = False.
So I guess it is meant to be that way. It just did not look right to me.
Kind of like I could push it but then I can't!
Oh well...
VB6 it is the way I described it. The color is &H80000010& on my system and I would probably call it ForeColorDisabled.
But now I don't know if it really makes sense to add a property. You would have to do thid fr the other controls too.
I was not aware of the possibility to use different LookAndFeel options. Very interesting and a bit scary ...
Its not easy to predict the outcome.
Do you know if there is any Mac OS LAF to be able to simulate the LookAndFeel outcome of the Mac on my development environment?
The Tabstrip for example behaves different on the Mac.
Personally I would rather like to see energy spent on other things:
It would be great to be able to add an image to the JBGrid header to accomplish a ColSortIndicator. (Or maybe even only the possibility to change the BackColor of a single ColumnHeader)
I know we can use the Jtable directly. Still it would be nice.
The Jtable ColSortIndicator is bound to the AutoSort property. Since I am sorting the underlying SQL it would be nice to be able to set a ColSortIndicator(Up/Down) with a simple property.
I don't know Java well enough to do this myself. But this would definitely be a nice feature.
Dani
This post has been edited 1 times, last edit by "Dani" (Nov 20th 2011, 10:44pm)
It looks more like an "emboss-effect". So not only a changed color.it looks like grey is mixed with white in VB!
Have myself tried out to create something in Visual Basic Express 2008.
In this screenshot
in every row is the same ForeColor. And in the first colum all are enabled and in the second are disabled.
I have created one window where every background is green and one, where every background is red. The Background of the buttons don't changed.
As you see, for the enabled buttons the BackColor have no effect.
And for the disabled buttons the background of it is always white and for the foreground is used a darken BackColor.
And in this screenshot
I have changed the BackColor of the buttons insetead of the ForeColor.
In this case, the Captions text is a darken BackColor of the button background.
I think, that this behaviour is very Windows-typical. And I don't know if it looks nice on Applications with an different LookAndFeel then the WindowsLookAndFeel.
Greatings
theuserbl
Similar threads
-
Tips, Tricks, Samples & Tutorials »-
ORPG in Jabaco-applet
(Apr 19th 2010, 11:55pm)
-
Tips, Tricks, Samples & Tutorials »-
Present Snatch
(Nov 15th 2011, 8:14am)
-
Bugreports and known bugs »-
[VERSION 1.5.2] Dialog behaves visually as if set .enabled=False
(Oct 31st 2011, 7:43pm)
-
General topics, questions and discussions »-
Empty String
(Sep 26th 2011, 6:10pm)
-
Visual Basic 6 Compatibility »-
WebBrowser
(Sep 21st 2009, 5:49pm)
