Results 1 to 11 of 11

Thread: How can I flatten ComboBox in vbnet

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Location
    London
    Posts
    6

    How can I flatten ComboBox in vbnet

    Hi there

    I have some inherited Controls in my application and i would like to make them flatcontrols .

    Is there anybody out there who has a class which I can pass my control and make it flat.?

    Preferably in vb.net.

    Thanks
    Gabriel
    Thanks for your help and suggestion
    Gabriel

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Man the combobox is of the devil, you can ownerdraw it or override the paint but really there is a textbox constitue control in there and I don't know how to get a handle to it. So when you paint on it you can only paint the combo part around the text part and sometimes that makes the textbox part not match.

    Although I was trying to draw over the whole thing so maybe there is a way to flat it. I have the code at work I'll post it tomorrow.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Location
    London
    Posts
    6
    Hi there.
    Thanks for your reply.

    Its proving a real nightmare too make these badly control look good.

    I have tried to convert into vb.net a control that a guy on http://www.codeproject.com/cs/combob...etcombobox.asp
    but I failed.

    It didnt draw properly.

    My idea was to create a general class where I could pass the control and that would flatten it.
    But may be is not worth the hassle.

    If anybody can convert the above successfully would be great.

    Thanks
    Gabriel
    Thanks for your help and suggestion
    Gabriel

  4. #4
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    each control type is different so u cant just make a class that would flatten all the controls
    \m/\m/

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Location
    London
    Posts
    6
    What about flatten a combobox
    Anybody done that in vb.net

    Thanks for any suggestions or examples
    Gabriel
    Thanks for your help and suggestion
    Gabriel

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Yeah I say that link before and it looks great I was just too lazy to decipher all of the UtilityLibrary.

  7. #7
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Well here is the attempt I mentioned before. It should give you a push in the right direction, albeit a small one. It would be easy if there wasn't that inner edit control. Let me know if you get further and I will try to help more if I can.

  8. #8

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Location
    London
    Posts
    6
    Hi Thanks for emailing the flatcombo
    I will have a look and I far I get.
    Thanks for your help and suggestion
    Gabriel

  9. #9
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Here is another way to do it which I don't like all that well but it is closer to working. In the derived class I just add a textbox and panel to the combobox.controls collection and place them properly.

  10. #10
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Ok now I have decided that I hate the ComboBox and it must die! Anyone with information to the where abouts of said ComboBox, or knowledge of how to destroy it please notify me at, [email protected]

  11. #11
    Hyperactive Member
    Join Date
    May 2002
    Location
    Wisconsin, USA
    Posts
    279
    I hate the combobox object.

    I also hate the textbox object. You can't make the scrollbars ownerdrawn!!!

Posting Permissions

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



Click Here to Expand Forum to Full Width