Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkbox bug?
Message
From
28/04/2008 18:53:09
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01313656
Message ID:
01313679
Views:
8
I have notes on this in one of my classes when I was trying it. I have a note that Fred uses RGB(0,0,1) and Naomi 64,64,64. Not sure if either or both will work (it's been too long).


>Maybe it is an old bug I cannot seem to remember but my memory was always bad...
>
>If you have a disabled checkbox with a caption that spans multiple lines, and you want to dynamically change it's disabled fore color, it does not work properly if you try to set it to black!
>
>Try the following code and then change myCheckBox.Refresh so it changes to any color but black, for example a near black value (1)
>
>
>
>loForm			= Createobject('myForm')
>loForm.Show(1)
>
>define class myForm as Form
>	add object myCheckBox as CheckBox with	Caption = 'Some caption, very long caption, that stretches more than one line', ;
>						Enabled = .f., ;
>						DisabledForeColor = 255, ;
>						Value = .f., ;
>						height = 200, ;
>						width = 100, ;
>						autosize = .f., ;
>						wordwrap = .t.
>
>	add object myCommand as CommandButton with Caption = 'Change color', Top = 210
>	
>	procedure myCommand.Click()
>		thisform.myCheckBox.Value		= not thisform.myCheckBox.Value
>		thisform.myCheckBox.Refresh()
>	endproc
>	
>	procedure myCheckBox.Refresh()
>		this.DisabledForeColor			= Iif(this.Value, 0, 255) && Use this for the first run, it will not work
>*		this.DisabledForeColor			= Iif(this.Value, 1, 255) && Use this for the second run, it works
>	endproc
>enddefine
>
>
>I am sure is something old, but I just found it and thought about sharing it
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform