|
-
Jun 29th, 2005, 06:58 PM
#1
Thread Starter
Fanatic Member
listbox display out of a frame (resolved)
hi i have a list box within a frame and i make the list box flexible in such a way that the sizes varies depending on the data contains inside. But if the list box is larger than the frame it is blocked. How do i make the listbox showing the full display ie out of the frame? thank you.
Regards,
Goh
Last edited by Goh; Jun 29th, 2005 at 09:27 PM.
-
Jun 29th, 2005, 07:07 PM
#2
Re: listbox display out of a frame
You'd have to resize container (frame in your case) or use combobox instead - dropdown portion can go beyond parent container's boundaries.
-
Jun 29th, 2005, 07:16 PM
#3
Thread Starter
Fanatic Member
Re: listbox display out of a frame
yes you are right the drop down comes with the scrollbar of the listbox which is still within the frame. but i would like to length the box (.width base on the data contains) how do i resize the frame?. it is suppose to be fixed. do u mean i will resize the frame as and when the listbox is adjusted to a certain size?
Regards,
Goh
-
Jun 29th, 2005, 07:29 PM
#4
Re: listbox display out of a frame
 Originally Posted by Goh
... do u mean i will resize the frame as and when the listbox is adjusted to a certain size?
That is exactly right. The problem you may have is the fact that list may get pretty long so your listbox and as a result you may run out of space so using combobox is much cleaner way.
-
Jun 29th, 2005, 07:32 PM
#5
Thread Starter
Fanatic Member
Re: listbox display out of a frame
one more question, is it possible to make a line as similar to a default frame (as in the display) thanks
-
Jun 29th, 2005, 07:38 PM
#6
Re: listbox display out of a frame
Not sure I understand. Can you show some image of what you speak, please.
-
Jun 29th, 2005, 08:09 PM
#7
Thread Starter
Fanatic Member
Re: listbox display out of a frame
sorry i will explain again.. i
i got a new form and i put a frame and a line . am i able to change the line in such a way that the line looks the same as the frame? the looks i mean
-
Jun 29th, 2005, 08:29 PM
#8
Re: listbox display out of a frame
Oh, ok ...
Wel, you may do that by using two lines:
- draw first line and set BorderWidth = 2 and BorderColor = Button Shadow
- draw another line and set BorderWidth = 1 and BorderColor = Button Highlight
- move second line over first and see the effect.
-
Jun 29th, 2005, 08:33 PM
#9
Re: listbox display out of a frame
VB Code:
Dim lngWidth As Long
Dim lngLongest As Long
Dim lngIndex As Long
lngWidth = List1.Width
'see what the longest entry is
For lngIndex = 0 To List1.ListCount - 1
If Len(List1.List(lngIndex)) > Len(List1.List(lngLongest)) Then
lngLongest = lngIndex
List1.Width = Me.TextWidth(List1.List(lngIndex) + Space$(5))
End If
Next lngIndex
Frame1.Width = Frame1.Width + (List1.Width - lngWidth)
-
Jun 29th, 2005, 08:35 PM
#10
Re: listbox display out of a frame
Also, you can use frame control itself by setting its caption to "" and Height (or Width) = 30 (or close to 30).
-
Jun 29th, 2005, 09:26 PM
#11
Thread Starter
Fanatic Member
Re: listbox display out of a frame
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
|