What column of ListBox am I clicking in? 
Author Message
 What column of ListBox am I clicking in?
Hello all,
        I have a ListBox on a window that displays a Queue.  This is
for an Appointment Scheduling program.  There is a record in the queue
for every 10 minutes of the day(8 - 6) and a field for 6 different
doctors(many other fields exsist for coloring and such but only 6
columns in the box.).  When the user double clicks on the listbox I
want to bring up a Schedule Appointment Procedure with the Time preset
based on the record of the Queue they clicked on and the Doctor preset
based on what column of the listbox the clicks occured.  The time is
easy as it is based on the record but how do I do the column?
Currently the user presses a button and manually selects the doctor on
the form but I would like to automate that.  Please help me if you
can.  Thanks
Lee Goolsby, CIO
Anesthesia Billing Assoc.




Fri, 07 Dec 2001 03:00:00 GMT  
 What column of ListBox am I clicking in?
Hi Lee,

code snipped:

  OF ?RelTree
      CASE EVENT()
      OF EVENT:NewSelection
        IF KEYCODE() = MouseLeft
          REL1::CurrentChoice = CHOICE(?RelTree)
          GET(Queue:RelTree,REL1::CurrentChoice)
          DocNr = -1
          CASE ?RelTree{PROP:Column}
          OF 0 ; DocNr = -1                           !Columns Disabled
          OF 1 ; DocNr = -1                           !REL1::Display
          OF 2 ; DocNr = 0                            !REL1::Doct0
          OF 3 ; DocNr = 1                            !REL1::Doct1
          OF 4 ; DocNr = 2                            !REL1::Doct2
          OF 5 ; DocNr = 3                            !REL1::Doct3
          OF 6 ; DocNr = 4                            !REL1::Doct4
          OF 7 ; DocNr = 5                            !REL1::Doct5
          END
          IF NivoNr = -1 THEN CYCLE .

HTH
Maarten



Fri, 07 Dec 2001 03:00:00 GMT  
 What column of ListBox am I clicking in?
Hi Lee,

Quote:
> I have a ListBox on a window that displays a Queue.  This is
> for an Appointment Scheduling program.  There is a record in the queue
> for every 10 minutes of the day(8 - 6) and a field for 6 different
> doctors(many other fields exsist for coloring and such but only 6
> columns in the box.).  When the user double clicks on the listbox I
> want to bring up a Schedule Appointment Procedure with the Time preset
> based on the record of the Queue they clicked on and the Doctor preset
> based on what column of the listbox the clicks occured.  The time is
> easy as it is based on the record but how do I do the column?
> Currently the user presses a button and manually selects the doctor on
> the form but I would like to automate that.  Please help me if you
> can.

    You can use PROPLIST:MouseDownField - it returns the column number when
the mouse is pressed.

Regards,

Anton Novikov



Sat, 08 Dec 2001 03:00:00 GMT  
 What column of ListBox am I clicking in?
Anton,
        Thanks, that is exactly what I was looking for.  It works
great.  There is some neat stuff in FORMAT(set LIST or COMBO layout)
in the help files.  

On Tue, 22 Jun 1999 14:10:59 +0400, "Anton Novikov"

Quote:

>Hi Lee,

>> I have a ListBox on a window that displays a Queue.  This is
>> for an Appointment Scheduling program.  There is a record in the queue
>> for every 10 minutes of the day(8 - 6) and a field for 6 different
>> doctors(many other fields exsist for coloring and such but only 6
>> columns in the box.).  When the user double clicks on the listbox I
>> want to bring up a Schedule Appointment Procedure with the Time preset
>> based on the record of the Queue they clicked on and the Doctor preset
>> based on what column of the listbox the clicks occured.  The time is
>> easy as it is based on the record but how do I do the column?
>> Currently the user presses a button and manually selects the doctor on
>> the form but I would like to automate that.  Please help me if you
>> can.

>    You can use PROPLIST:MouseDownField - it returns the column number when
>the mouse is pressed.

>Regards,

>Anton Novikov




Sat, 08 Dec 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. (wxPython) Double left clicking and right clicking with ListBoxes

2. VAST - click column sorting

3. Browse Column Counts - What am I missing?

4. click on listbox heading?

5. browse listbox using arrow and click problem

6. How to Detect click on Listbox Header?

7. Problem with Single Mouse Click Trapping on Listbox

8. Listbox Header Clicks

9. How to drop a listbox without clicking on it

10. detecting double-click in a vruby listbox ??

11. Listbox losing selection on entry double-click

12. Tkinter listbox clicking problem

 

 
Powered by phpBB® Forum Software