Discussion:
Go to selected item in a CheckListBox
(too old to reply)
jodleren
2010-07-23 15:55:34 UTC
Permalink
Hi there

Any ideas?
I have tried different E/WM_SCROLLs etc... did not find mush working,
nor anything on the net :/

I have X coloumns, and sometimes it is out of the visible area

WBR
Sonnich
jodleren
2010-07-23 16:05:57 UTC
Permalink
Post by jodleren
Hi there
Any ideas?
I have tried different E/WM_SCROLLs etc... did not find mush working,
nor anything on the net :/
I have X coloumns, and sometimes it is out of the visible area
WBR
Sonnich
That is one thing, I just realised that it is related to my change of
coloums - when going from 10 to 5, it remains 10 :)
Uploading it all again does not change anything nor does Update.

I have an option for "detailed" or "simple" view.
The detailed view needs coloums twice as wise as simple.

WBR
Sonnich
a***@aol.com
2010-07-23 17:00:53 UTC
Permalink
Post by jodleren
Post by jodleren
Hi there
Any ideas?
I have tried different E/WM_SCROLLs etc... did not find mush working,
nor anything on the net :/
I have X coloumns, and sometimes it is out of the visible area
WBR
Sonnich
That is one thing, I just realised that it is related to my change of
coloums - when going from 10 to 5, it remains 10 :)
Uploading it all again does not change anything nor does Update.
I have an option for "detailed" or "simple" view.
The detailed view needs coloums twice as wise as simple.
WBR
Sonnich
with MyCheckListBox do
case ItemIndex of
-1,0 : TopIndex := 0;
else
TopIndex := ItemIndex - 1;
end;
{end;}

and make top index the same when changing view

ATopIndex := MyCheckListBox.TopIndex
// change to detailed or simple view
MyCheckListBox.TopIndex := ATopIndex;

Alan Lloyd
Peter
2010-07-23 18:52:14 UTC
Permalink
Post by jodleren
Hi there
Any ideas?
I have tried different E/WM_SCROLLs etc... did not find mush working,
nor anything on the net :/
I have X coloumns, and sometimes it is out of the visible area
A listbox does not have true columns, they are just a alternative way
of displaying the items. So just set the ItemIndex to go to an item.
The listbox should scroll the item into view on its own. If it does not
you have to use WM_HSCROLL messages to scroll the listbox
*horizontally*, since it does not have a vertical scrollbar in column
mode.
--
Peter Below
Loading...