Solved

How to disable vertScrollBar in TCheckListBox and use code to scroll

Posted on 2000-04-13
5
204 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 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