Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Hatsukaichi, Hiroshima, Japan
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo Box Sections (VB (CorelDraw 12))

    Hello, I'm creating a form for Coreldraw using visual basic and I have a combo box. What I'd like to know is if there is any way to divide a combo box into sections. I think creating a multicolumn combo box might be beyond me so I thought of having a flat list but I'd like each list to have a header line that the user can't actually select. Is that possible. I see combo boxes online that list Countries and these are sometimes divided by geographical region. I'm basically looking for some way to divide the combo box lists into sections. My knowledge of coding is fairly limited so my apologies if I've asked a daft question.

    Thanks,

    Chris (Hunt)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box Sections (VB (CorelDraw 12))

    The standard MSForms combo box doesn't offer this functionality. There is no way to make certain items stand out by different formatting and to prevent the user from selecting them. You'd need fairly complicated Windows API code for that.

    Alternatively, you could use two (or even more) "linked" combo boxes. For example, the user selects a country from the first combo box, and this populates the second combo box with a list of provinces or states of the selected country. You'd need some VBA code for this, but it's not complicated.

    Another possibility is to use the Microsoft Treeview Control (think the left-hand pane of Windows Explorer), but that requires more complicated code.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Hatsukaichi, Hiroshima, Japan
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box Sections (VB (CorelDraw 12))

    Thanks Hans. Bearing in mind what you have said I think I'll probably use a couple of radio buttons and use that to populate the choices in the combo box. I'm not a big fan of combo boxes and don't want more than one.

    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •