Change mouse cursor based on column in browse

Hello,
Is there a way to change the mouse cursor icon when you point the mouse to a certain column you want to set? I am trying to mimic an action button per record.

Thanks.

Edit in Place has the code to place controls (buttons, drop down list boxes) in the column, you could look at that code and alter it to change the cursor.

Is your Action column and circle just an icon or an Edit in Place button? If its not the latter, have a look at the Edit in Place. Version two of EIP worked better for me.

1 Like

My Action button is just an Icon. I only post an accept event on action buttons whenever that icon is pressed.


here is my another sample.
I will try using EIP method.

Thanks a lot!

I have tried using edit in place, I need to click first before the cursor changes.

Instead of that, I should just point the mouse cursor towards the column that I need to make the cursor change to CURSOR:Hand without the need to click it first

I’ve put together a demo app for you.

1 Like

You could put a REGION,CURSOR(Cursor:Yada) over the column

Then on EVENT:Accepted, figure out where the click would have been so you can simulate the click on the list control

1 Like

How would you get the column co-ordinates if the window is resized?

Pretty sure the solution I’ve used in the past was to subclass the listbox and post a user event, vs polling via a TIMER.

1 Like

To get exact location of cells use PROP:Edit and GetPosition() plus List AT()

ListColumnPositions PROCEDURE(LONG ListFEQ, *QUEUE PosQueue) 
EipFEQ LONG,AUTO
ListX  LONG,AUTO 
ListY  LONG,AUTO 
CPQ GROUP,PRE(),AUTO 
P LONG,DIM(4)
    END      
C USHORT,AUTO
  CODE 
  GETPOSITION(ListFEQ,ListX,ListY)
  EipFEQ=CREATE(0,CREATE:Button)  
  LOOP C=1 TO ListFEQ{PROPList:Exists,0}
     ListFEQ{PROP:Edit,C}=EipFEQ 
     GETPOSITION(EipFEQ,P[1],P[2],P[3],P[4]) 
     ListFEQ{PROP:Edit,C}=0
     P[1]+=ListX ; P[2]+=ListY
     PosQueue=CPQ 
     ADD(PosQueue)
  END 
  DESTROY(EipFEQ)
2 Likes

Learnt something new…

> ComCtl32.dll version 6 is Unicode only. The common controls supported by ComCtl32.dll version 6 should not be subclassed (or superclassed) with ANSI window procedures.

I’ve never expect that there are so many ways, but I think by checking this source is enough to solve my concern.

Thanks all.

Please post some code excerpts and explain so it’s here in the topic to see and help others.

It would appear subclassing is what MS is also suggesting in a round about way and we should be using common controls 6, so are the official docs wrong?