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 2: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 575
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,476
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,917


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100