Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB2005 / Checkbox question

Options
  • 19-10-2006 8:57am
    #1
    Closed Accounts Posts: 314 ✭✭


    I am creating some checkboxes at run time, the text in the checkboxes keeps getting truncated through.

    IE the check box will appear

    []Admin

    rather than

    []Admin Accounts

    Does anyone know a property to force the checkbox to display the entire text?


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    Post the code you're using to create the checkboxes. It will give us a much better idea of what you're doing and possibly what you're doing wrong.


  • Registered Users Posts: 1,466 ✭✭✭Smoggy


    It should be as straight fwd as :

    CheckBox1.Text = "WORD1 WORD2"


  • Registered Users Posts: 456 ✭✭ceejay


    It may be that the default width for the checkbox is not wide enough to show the full text. Make sure to change the width after you add the control at run-time.

    HTH

    Ciarán.


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    We'll also need to know if this is on a web form or a windows form?


  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    Whether it's winforms or webforms or whatever, just click on your box and stretch it to make it wider. Or you can set the width in your code (mychecbox.Width = 100;)

    Or you can set the width in the property pane that appears on the right hand side when you select a control. Change the width property to be wider.


  • Advertisement
  • Closed Accounts Posts: 314 ✭✭Jimboo_Jones


    Its a Windows Form. VB2005

    because I am creating the checkboxes at runtime you cant click and 'stretch' the text portion of the checkbox.... and you dont seem to be able to do that in VB.Net now at design time.

    Anyway - after hitting my head against a wall for two days, I have decided to scrap my project and start a new one using the TreeView control instead, so far it seems to be working OK.

    Ahh, looking in the property window of the checkbox its size.width ... I'll fire up the old project tomorrow and give that a go :) though I think I will stick with the TreeView as that looks far better.

    Thanks for the help


Advertisement