-
Nov 6th, 2005, 08:45 AM
#1
-
Nov 7th, 2005, 04:50 PM
#2
Re: UniListBox, Unicode ListBox
A bug found. Easy to fix: goto UserControl_Terminate and add SubClass.Unsubclass before the Set SubClass = Nothing. This fixes a bug that causes rare crashes (maybe one for every hundred runs or so).
-
Mar 12th, 2006, 08:51 PM
#3
New Member
Re: UniListBox, Unicode ListBox
Your code was missing TopIndex property. It can be added easily as
Public Property Get TopIndex() As Long
TopIndex = SendMessage(lst.hWnd, LB_GETTOPINDEX, 0&, ByVal 0&)
End Property
Public Property Let TopIndex(ByVal NewIndex As Long)
SendMessage lst.hWnd, LB_SETTOPINDEX, NewIndex, ByVal 0&
End Property
However, there are 2 problems that I found:
1. When setting ListIndex, the line is not highlighted.
2. The vertical line spacing does not match that of a standard listbox; it is smaller by a couple of pixels, meaning that side-by-side listboxes are misaligned.
Suggestions on how to fix these problems?
-
May 5th, 2006, 12:50 AM
#4
Junior Member
Listbox - highlight selected?
Done search of how to make, force...whatever. The listbox on form to highlight the first item listed in the listbox when the form loads. I have issue nothing i try works. I would assume by default it should do it on its own, but obviously not.
btw this is on a unbound form.
Here is code:
VB Code:
Private Sub Form_Load()
With mrsEmp
Do Until .EOF
lstBoxEmployees.AddItem !szLast_nm & ", " & !sFirst_nm
lstBoxEmployees.ItemData(lstBoxEmployees.NewIndex) = !lEmp_id
.MoveNext
Loop
.MoveFirst
lstBoxEmployees.Text = !szLast_nm
End With
This is part of code it basically loads data from database into the listbox on the load event of the form. This works perfect no problems all data there and it shows the first item data on rist of form but in the listbox its not highlighted. I need it highlighted on load.?
anyone know how to do this?
any help much appreciated
-
May 5th, 2006, 01:06 AM
#5
Junior Member
Re: UniListBox, Unicode ListBox
Never Mind...found it. Funny I did search everywhere else but here
Found solution few minutes later. Thank VMWIRE.
VB Code:
lstBoxEmployees.Selected(0) = True
-
Jan 18th, 2013, 11:10 PM
#6
Hyperactive Member
Re: UniListBox, Unicode ListBox
I know this thread is very old, but I downloaded the zip, registered the library and when running the program, ran into an unsupported property, "UpdateMode". So I went into the code and found that the property was definitely defined, but for some reason, the program does not see it. Any ideas as to why this would be happening?
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
|