|
-
Jul 12th, 2000, 08:00 AM
#1
Thread Starter
Addicted Member
You'll all have to forgive me. I am sure I posted this last night but I can't find my post.
Basically I am trying to find a way to supress the scroll bars in a list box when it is in 2 collumn mode. I don't see a property to turn it off.
Does anyone know?
Eiredrake
-
Jul 12th, 2000, 12:35 PM
#2
_______
<?>
Can't help with the quesion but maybe you'd like to know.
typo maybe...
I concider all knowledge to be my province.
{consider}
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jul 12th, 2000, 12:41 PM
#3
_______
<?>
you can add tabs to give the effect of having columns
this way you don't use the property column
it won't create scrollbars..even if you need them..
Code:
'set tab stops in a listbox
'appears as columns
'
Option Explicit
'
Public Declare Function SendMessageArray Lib _
"user32" Alias "SendMessageA" _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long
Public Const LB_SETTABSTOPS = &H192
'<<<<< code for form >>>>>
'
Private Sub Command1_Click()
List1.AddItem "Nothing More"
List1.AddItem "Nothing Less"
List1.AddItem "Just A Sample"
Dim r As Long
'set up the tabstops in the listboxes
ReDim TabStop(1 To 3) As Long
'assign values to the tabs for the second third and fourth
'column (the first is flush against the listbox edge ie...0)
TabStop(1) = 80
TabStop(2) = 160
TabStop(3) = 240
'set the tabs
r = SendMessageArray(List1.hwnd, LB_SETTABSTOPS, 3, TabStop(1))
List1.Refresh
List1.AddItem "...A lesson" & vbTab & "in creating" & vbTab & "columns" & vbTab & "in a listbox!"
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jul 12th, 2000, 12:52 PM
#4
Thread Starter
Addicted Member
Scrollbars
Actually I found a simpler solution.
And yeah I made a typo in my sig... <shrug> oh well.
Thanks though.
Eiredrake
Option Explicit
Private Declare Function ShowScrollBar Lib "user32" _
(ByVal hwnd As Long, ByVal wBar As Long, _
ByVal bShow As Long) As Long
Private Const SB_BOTH = 3
Private Const SB_HORZ = 0
Private Const SB_VERT = 1
Private Sub List1_Click()
ShowScrollBar List1.hwnd, 3, False
End Sub
-
Jul 12th, 2000, 11:16 PM
#5
Thread Starter
Addicted Member
Better question
Does anyone know how to control the size of the columns on a listbox set to COllumns>0?
Or how to get rid of that damned focus box that gets drawn on it when it has focus?
Thanks,
Eiredrake
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
|