OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: VovKa on February 18, 2011, 09:51:32 AM

Title: grid dropdown combo list problems
Post by: VovKa on February 18, 2011, 09:51:32 AM
(dcl_Grid_StartCellEdit <CONTROL> Row Column) does not work on cells of type 36 (dropdown combo list)

(car (dcl_Grid_GetCellDropList <CONTROL> Row Column)) for cells of type 36 (dropdown combo list) is in reverse order

OpenDCL.Studio.ENU.6.0.2.1
Title: Re: grid dropdown combo list problems
Post by: owenwengerd on February 20, 2011, 10:19:48 AM
I have fixed the (dcl_Grid_GetCellDropList) reverse order bug. (dcl_Grid_StartCellEdit) is working for me. Make sure you set the cell style before setting the drop list, otherwise the list gets reset when you change the cell style.
Title: Re: grid dropdown combo list problems
Post by: VovKa on February 23, 2011, 09:17:03 AM
thanks for the reply, Owen
but
here -> http://www.opendcl.com/forum/index.php?topic=700.msg3445#msg3445 (http://www.opendcl.com/forum/index.php?topic=700.msg3445#msg3445) Fred posted an example of using grid control - one can use Enter to start editing a cell in the next row
i've changed c:userdata_input_OnInitialize function to demonstrate "the bug"
Code (autolisp) Select
(defun c:userdata_input_OnInitialize (/ nRow)
      (foreach lstItem lstData
          (setq nRow (dcl_Grid_AddRow userdata_input_grd_data
                                      (list (car lstItem) (cdr lstItem))
                     )
          )
          (dcl_Grid_SetCellStyle userdata_input_grd_data nRow 1 36)
          (dcl_Grid_SetCellDropList userdata_input_grd_data nRow 1 '("1" "2" "3"))
      )
  )

run the code, type something in the first row, then press Enter, nothing will happen
Title: Re: grid dropdown combo list problems
Post by: owenwengerd on February 23, 2011, 12:46:20 PM
I tested your modified version of Fred's code. It appears to work if I just click in the cell without entering anything, but it does not work after typing something. I can't easily tell whether this is due to a bug in (dcl_Grid_StartCellEdit) or a bug in the lisp code, but the fact that it works if nothing is entered leads me to believe the bug is in the lisp code.
Title: Re: grid dropdown combo list problems
Post by: VovKa on February 24, 2011, 02:42:13 PM
i found one more thing
load Fred's code (with my modification) into vlide
set the breakpoint just at the beginning of C:userdata_input_grd_data_OnEndLabelEdit (before cond)
run the code
type something in first row
hit Enter
acad switches to vlide
press Continue
acad switches back
now you are in the second row and editing
Title: Re: grid dropdown combo list problems
Post by: owenwengerd on February 25, 2011, 09:37:48 AM
From your description, it seems to be working as I would expect.