Arguments List for CONTROL-NAME Functions

Started by vosey, October 08, 2014, 05:44:37 AM

Previous topic - Next topic

vosey

I'm attempting to Trigger an event when I click into a cell within a Grid but without much success.
I thought the 'OnBeginLabelEdit' Event would be Perfect, so I copied into my Lisp File but I don't really understand
where to go from there.  My confusion lies around the function Argument List (Row Column), do these become variable
names that I can subsequently use?.  Also unsure of what to place into the body of the function? - I tried

(defun c:<CONTROL-NAME>#OnBeginLabelEdit (Row Column /)
   (alert "hello")
)

Just to see when it triggered, but nothing seems to happen whatever I do.  I'm sure I'm missing something obvious but I just can't spot it.  Any help/Suggestions would be great. Thanks
(The Grid is within a Modal Dialog)

vosey

Not too sure what happened, but it's now working !  - I restarted the Acad Session and all's fine..
(defun c:rd/Form1/Grid1#OnSelChanged (Row Column /)
   (alert (strcat (itoa Row) " - " (itoa Column)))
)

Cheers
Pete

vosey

Just realised - Now using OnSelChanged instead on OnBeginLabelEdit..

owenwengerd

OnBeginLabelEdit only fires for cell styles that support editing, so that may explain your initial observation.