Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a situation where I need to insert titles between checkboxes. I am generating checkboxes automatically.

example:

 

Title one

 

checkbox1

checkbox2

 

title two

 

checkbox3

checkbox4

 

How do I insert titles between checkboxes?

  • *Experts*
Posted

All you need to do is declare a new Label class in code, set its

properties to make it look right, and then add it to the form's

Controls collection. You'll need to do some math to correctly place

the labels and checkboxes.

 

' Declare the new label
Dim newLabel As New Label()

' Set its properties (these are just examples)
With newLabel
 .Text = "Title one"
 .Font.Bold = True
 .Location = New Point(8, 8)
 .Size = New Size(80, 8)
End With

' Add it to the form
Me.Controls.Add(newLabel)

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

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