English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 23 September 2016, 05:33   #1
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 42
Posts: 3,054
GadTools ListView questions.

How do I get messages from a GadTools listview scroll bar and arrow keys? I have working code that allows selecting listview items with the cursor keys, but I can't get the scroll bar and arrow keys to send any messages.
Thorham is offline  
AdSense AdSense  
Old 23 September 2016, 10:41   #2
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 3,026
I don't think the Listview gadget passes those messages on, but first make sure your window has WFLG_REPORTMOUSE set and you're looking for IDCMP_MOUSEMOVE and IDCMP_INTUITICKS as these are needed for reading scrollbars. If that doesn't pass the messages through to your window, perhaps you just need to poll the Listview every time you get an Intuiticks message and see what the GTLV_Top value is. Not ideal but it should work.
Daedalus is offline  
Old 23 September 2016, 17:58   #3
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 42
Posts: 3,054
Quote:
Originally Posted by Daedalus View Post
I don't think the Listview gadget passes those messages on
I think you may be right.

Quote:
Originally Posted by Daedalus View Post
If that doesn't pass the messages through to your window, perhaps you just need to poll the Listview every time you get an Intuiticks message and see what the GTLV_Top value is. Not ideal but it should work.
I was afraid I'd have to do something like that.

Thanks
Thorham is offline  
Old 23 September 2016, 19:10   #4
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 42
Posts: 3,054
Anyone else have any ideas?
Thorham is offline  
Old 23 September 2016, 19:42   #5
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 42
Posts: 3,054
Solved it. You can just calculate the top item from the selected item and the mouse position.
Thorham is offline  
Old 24 September 2016, 17:52   #6
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,670
Why don't you use the GTLV_Top attribute?
thomas is online now  
Old 24 September 2016, 19:48   #7
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 42
Posts: 3,054
Quote:
Originally Posted by thomas View Post
Why don't you use the GTLV_Top attribute?
Because I didn't find a way to read it (just did: GT_GetGadgetAttrs). It's not in the AOS2.x documentation (which is why I didn't find it at first), because it's 3.x, and since it's 3.x only, I'm not using it. This stuff should just work on 2.x too.

Last edited by Thorham; 24 September 2016 at 20:19.
Thorham is offline  
Old 25 September 2016, 09:50   #8
bubbob42
Registered User
 
Join Date: Oct 2012
Location: Germany
Posts: 379
Hm, it's your decision, but nowadays ppl seem to have either 3.x or 1.3. Except for some A600s with soldered kick 2.x.
bubbob42 is offline  
Old 25 September 2016, 21:06   #9
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 42
Posts: 3,054
Quote:
Originally Posted by bubbob42 View Post
Hm, it's your decision, but nowadays ppl seem to have either 3.x or 1.3. Except for some A600s with soldered kick 2.x.
While that's probably true, I see no reason to make this thing not work under 2.x, especially since it's written for use with FrexxEd, which is 2.x compatible.
Thorham is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change a gadtools button's text? alkis Coders. C/C++ 15 26 April 2016 19:11
gadtools zharn Coders. C/C++ 6 21 February 2014 20:26
How to build a ListView AGS Coders. General 0 22 December 2013 23:48
A few questions Muzer project.ClassicWB 10 12 September 2009 14:14
A few questions! One1 New to Emulation or Amiga scene 2 30 October 2002 17:41

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.06754 seconds with 13 queries