Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • *Experts*
Posted
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)?
Posted
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).

rustyd
Posted

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?

  • *Experts*
Posted

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

Member, in good standing, of the elite fraternity of mentally challenged programmers.

 

Dolphins Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...