|
-
May 14th, 2008, 07:17 AM
#1
Listbox created at runtime makes problems
On a groupbox control I add at runtime a listbox control. But only the part of the listbox inside the groupbox is displayed. I need to show the whole listbox control even it the listbox is bigger than the parent groupbox. I call the BringToFront( ) method on the listbox object but it doesn't help.
If I create the listbox by adding it at design time, it is displayed correctly even if the listbox is bigger than the parent groupbox.
How can i resolve this problem?
Thanks!
-
May 14th, 2008, 07:30 AM
#2
Re: Listbox created at runtime makes problems
Resize the groupbox.
groupbox.Size.Width = listbox.Size.Width;
groupbox.Size.Height = listbox.Size.Height;
-
May 14th, 2008, 08:31 AM
#3
Re: Listbox created at runtime makes problems
I don't want to resize the parent groupbox. I want to display the listbox as it is, even it is bigger (listbox's height is bigger than it's parent height) than the parent groupbox.
-
May 14th, 2008, 09:18 AM
#4
Re: Listbox created at runtime makes problems
Then resize the listbox.
Or am I just missing something?
-
May 14th, 2008, 12:28 PM
#5
Re: Listbox created at runtime makes problems
Parent windows clip their children.
So if you have a window (listbox) which is bigger than its parent (groupbox) then the parent (groupbox) will clip the child window.
So what you're trying to do won't work.
Darwen.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|