?
Solved

How to disable vertScrollBar in TCheckListBox and use code to scroll

Posted on 2000-04-13
5
Medium Priority
?
212 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 88 total points
ID: 2713821
0
 

Author Comment

by:jacksonrf
ID: 2715567
You the man!  
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month12 days, 11 hours left to enroll

777 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