setting scrollbars
-
hi, can someone tell me how to setup scrollbars. i simply want to make a CListBox that i manually update with data(it's not allowed to use it's own array). If i want to do something like this i need to read the scrollbar and set the scrollbar, but how? i hope you get what i mean? greetz, []D [] []D []
-
hi, can someone tell me how to setup scrollbars. i simply want to make a CListBox that i manually update with data(it's not allowed to use it's own array). If i want to do something like this i need to read the scrollbar and set the scrollbar, but how? i hope you get what i mean? greetz, []D [] []D []
Try putting a scroll bar on the List box, and use SetCurSel and GetCurSel methods. This will scroll automatically to the selection you want. Hope it helps... "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
-
Try putting a scroll bar on the List box, and use SetCurSel and GetCurSel methods. This will scroll automatically to the selection you want. Hope it helps... "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
thats only possible with a ListBox that already contains the info. i think i explaint it wrong. i have a linked-list with about 2000 records. if i load all these record into the CListBox i get 2 problems: 1. it takes too long to load. 2. it takes too much memory. So this would be the solution: The listbox get's filled with the first 10 records. These records are shown. Once the user wants to see (for example) record 500 till 510, the listbox is updated with those 10 records(record 500 - 510). It seems like the ListBox contains all those 2000 records but in fact it only contains 10 records and keeps updating them(like a terminal). In order to know witch selection must be shown i need to read the ScrollList of the ListBox(or make one myself). I also have to virtually make the ScrollList(make it seem like there are 2000 records in the list), but i have no clue how to do this. Can somebody tell me this? []D [] []D []
-
thats only possible with a ListBox that already contains the info. i think i explaint it wrong. i have a linked-list with about 2000 records. if i load all these record into the CListBox i get 2 problems: 1. it takes too long to load. 2. it takes too much memory. So this would be the solution: The listbox get's filled with the first 10 records. These records are shown. Once the user wants to see (for example) record 500 till 510, the listbox is updated with those 10 records(record 500 - 510). It seems like the ListBox contains all those 2000 records but in fact it only contains 10 records and keeps updating them(like a terminal). In order to know witch selection must be shown i need to read the ScrollList of the ListBox(or make one myself). I also have to virtually make the ScrollList(make it seem like there are 2000 records in the list), but i have no clue how to do this. Can somebody tell me this? []D [] []D []
Sounds like you need to use a ListControl with ownerData (you can ste in resources). This lets you populate it only with the items that need to be shown at any given time. I have never done it myself, so beyound that I can;t be any extra help. Possibly examples of this in the ListControl section here at CP. Roger Allen Sonork 100.10016 Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
-
Sounds like you need to use a ListControl with ownerData (you can ste in resources). This lets you populate it only with the items that need to be shown at any given time. I have never done it myself, so beyound that I can;t be any extra help. Possibly examples of this in the ListControl section here at CP. Roger Allen Sonork 100.10016 Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
yes, thats what i need, but i've searched in the articles but the only thing i can find is pushbuttons for scrolling up and down in a CListBox, well for me thats the easy way out but not what i want. thanks for your help, i'll have to find another solution. []D [] []D []