|
-
May 29th, 2000, 02:52 AM
#1
Thread Starter
transcendental analytic
Ok, a listbox scrolls whenever you change the listindex, but how do i do that with the listview, at least i would like to set the topindex manually
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 29th, 2000, 02:57 AM
#2
I normaly use the EnsureVisible method of the ListItem.
-
May 29th, 2000, 03:24 AM
#3
Thread Starter
transcendental analytic
Damn, that simple, thanks anyway
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 29th, 2000, 11:08 AM
#4
Member
EnsureVisible method does work - But in past experiences in using it, the selected item appears "somewhere" in the visible window of the listview. Is there a way to make a selected item appear at the first visible row of the listview?
-
May 29th, 2000, 05:03 PM
#5
Thread Starter
transcendental analytic
Hmm, the topindex you mean? Oh, i'm sure there must be a way, i've seen it somewhere, but this time ensurevisible is good enough for me
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 30th, 2000, 11:46 AM
#6
Member
Yes - The topindex basically.
In my application I have a textbox above the listview. Lets say the first listview column is "Last Name." In the keypress event of the textbox, I capture the contents of the textbox, then loop thru the listitems searching for the contents of the textbox. If I find it, I make that listitem the selecteditem, and ensure visibility on that item. Then I setfocus on the textbox and make sure the cursor is at the end of the text, waiting for the next key from the user. Basically the same functionality of IEs address bar. As you type the system tries to point you to the item you're looking for.
Problem with ensure visible in my application is that the listview is pretty tall. As you type and the selected item changes, when you ensure visible the selected item isn't always in the same place. It'd be nice to always have the selected item at the top.
I know this is somewhat picky, but we all know how end users can be at times.
later...
-
May 30th, 2000, 03:14 PM
#7
Thread Starter
transcendental analytic
Try this, i'm not sure if it works with listview but it works with listbox...
Code:
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const LB_SETTOPINDEX = &H197
SendMessage ListBox1.hWnd, LB_SETTOPINDEX, newItemIndex, 0
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|