captions on check boxes

hazejean

Regular
Joined
Jul 11, 2003
Messages
68
in 6.0

check1.caption = "abc"

in conversion to .net it produced:

check1.text = "abc"
This results on blank by checkbox1

Any suggestions to replace check1.caption statement?
 
It should work. Are you sure the error is not somewhere else (or is it maybe a logic error resulting in that code never being executed)?
 
hazejean said:
in 6.0

check1.caption = "abc"

in conversion to .net it produced:

check1.text = "abc"

But then you said:
This results on blank by checkbox1

Any suggestions to replace check1.caption statement?

Is it named checkbox1, or check1? Probably not your issue because it would most likely produce an error, unless you have another checkbox called check1 (or checkbox1).
 
caption problem?

in VB 6.0 check1.caption = "abc" resulted in abc being next to checkbox1 on the form. VB .net converted the statement to:
check1.text = "abc" ...but abc does not appear next to checkbox1.



how do I get a lable next to a checkbox in VB .net?
 
I don't know if I'm missing something but...
if the checkbox is named CheckBox1 then in the form load event or any other event that names the control put CheckBox1.Text = "this is my caption". If your checkbox is named check1 then check1.text = "this is my caption".

I think this works for all VB.Net controls that have a text attribuite.

Hope that'll help
Dan
 
Back
Top