Solved

How to disable vertScrollBar in TCheckListBox and use code to scroll

Posted on 2000-04-13
5
201 Views
Last Modified: 2010-04-04
I have a checklistbox full of records.  The user must be able to scroll and select records using a touch screen, therefore, I want to disable the vertScrollBar and use a couple of command button's on click evernts to do the scrolling functions.  
I have tried using the 'ScrollBy' procedure to do the scrolling, but it don't work.

Sorry, 22 points is all I have. :-(
0
Comment
Question by:jacksonrf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 2713034
Hi,
you can try:

if Key = VK_F8 then
    SendMessage(checklistbox 1.Handle,WM_VSCROLL,SB_LINEDOWN,0)
else if Key = VK_F7 then
    SendMessage(checklistbox 1.Handle,WM_VSCROLL,SB_LINEUP,0);
end;


also SB_PAGEDOWN,SB_PAGEUP ETC..

Regards Barry
0
 

Author Comment

by:jacksonrf
ID: 2713197
Sorry.  Can you be more specific?
0
 
LVL 17

Expert Comment

by:inthe
ID: 2713378
er ok i mean something like this:

var
  Form1: TForm1;
  i : integer;
implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
i := checklistbox1.itemindex;
if (i = checklistbox1.Items.Count - 1) then exit
else begin
  SendMessage(checklistbox1.Handle,WM_VSCROLL,SB_LINEDOWN,0);
  checklistbox1.itemindex := (i + 1);
  end;
  end;

procedure TForm1.Button2Click(Sender: TObject);
begin
i := checklistbox1.itemindex;
if (i = 0) then exit
else begin
  SendMessage(checklistbox1.Handle,WM_VSCROLL,SB_LINEUP,0);
  checklistbox1.itemindex := (i - 1);
end;
end;
0
 
LVL 17

Accepted Solution

by:
inthe earned 22 total points
ID: 2713821
0
 

Author Comment

by:jacksonrf
ID: 2715567
You the man!  
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

742 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question