Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#WinForm
I want to create a listBox which floating on every controls of a form..
I draw a textBox in a groupBox, also draw a listBox under the textBox like autocomplete function of a textBox...
My problem is if the listBox height is longer than the groupBox it doesn't show the full length of listBox.
 
how to create a floating listBox?
 
thanks in Advance..
Posted 21-Feb-13 1:59am
Comments
Jegan Thiyagesan at 21-Feb-13 8:03am
   
Have you thought of docking the list box to "Fill"?
Jayanta Chatterjee at 21-Feb-13 8:12am
   
if I docked listBox to fill it will fill the groupBox area, I don't want to do that. I want to create like a autocomplete function,when the autocomplete suggestion box appears top of every controls. I use listBox as a suggestion box..
CHill60 at 21-Feb-13 8:56am
   
Could you have a listbox on the Form that has Visible = False until you need it then position it appropriately, set Visible=True and use BringToFront?
Jayanta Chatterjee at 21-Feb-13 9:04am
   
Sir, I solved it, first draw a listbox and then draw the groupBox on form. after that just drag the groupBox on the list box. the listBox will appear top of the groupBox.... :-)
Jegan Thiyagesan at 21-Feb-13 9:12am
   
You can do it that way but it is not elegant. Perhaps you should think of using a separate form for the list box and show/hide them as needed.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Just to pop it out of unanswered list.
OP commented: Sir, I solved it, first draw a listbox and then draw the groupBox on form. after that just drag the groupBox on the list box. the listBox will appear top of the groupBox.... Smile | :)
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 690
1 Dnyaneshwar@Pune 540
2 ravikhoda 325
3 OriginalGriff 279
4 Manas Bhardwaj 230
0 Sergey Alexandrovich Kryukov 10,974
1 OriginalGriff 6,777
2 Peter Leow 4,785
3 Abhinav S 3,813
4 Maciej Los 3,575


Advertise | Privacy | Mobile
Web01 | 2.8.140421.2 | Last Updated 21 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid