Problem - when a Listbox in a GroupBox

04-30-2006, 10:31 PM
Hi all,

This post was originally in the .net general forum but I think it should be better to post here:

In a groupbox I have a series of controls, due to the size of the groupbox I can only allowed to place a listbox in it with height has 1 line/item tall.

Potentially the listbox will be populated with 20-30 items so I'm managed to change the height of the listbox in the mouse_enter/mouse_leave event.

It works fine except the listbox's height is > groupbox's height as a result the bottom "expanded" porton is invisible to user, so I'm wondering is there any method to make the listbox "layer" on top of the groupbox's?

Thanks in advance.

05-01-2006, 03:51 PM
Why put the listbox in the Groupbox in the first place if you want it to be on top of the Groupbox?

05-02-2006, 01:02 AM
Hi Iceplug,

It's because I need to divide different controls in different group box, to make the form easier to read. So I put the listbox in a group box.

Unfortunatelly the group box has 88 in height and the listbox will be 200 when Mouse_Enter.

05-03-2006, 04:24 PM
What does your form look like? I'm having a hard time seeing how you need to have groupboxes with a height of 88 with listboxes of height 200 in them? Have you tried using a combobox? That sounds like what you want to use.

05-07-2006, 08:22 PM
Have you tried using a combobox? That sounds like what you want to use.

Ha ha Iceplug you got it!!

At first I use a Combobox, however end users want the system to allow them to have multiple items selected so I change to list box! To make that happen I have code in Mouse_Enter and Mouse_Leave to resize the list box. But it didn't really work... :(

05-08-2006, 05:38 PM
How about one combobox to pick items from and another combobox to hold items that are already selected? From the first combobox, you get selected items to add to the second combobox, and from the second combobox, you get selected items to be removed from the second into the first combobox.

05-08-2006, 07:04 PM
Hi Iceplug

Thanks!! Your advice just give me a new idea - I may provide a combobox by default, if the user wants to select multiple items, then click on a sort of "browse" button then a new form pops up with a list box... :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum