I'm probably missing something obvious here or being thickheaded about this,
but here's my situation:
I have a standard lookup button class I use all the time that I drop onto a
form, set several properties, do a simple query to create a picklist and
then it uses CREATEOBJECT to create a simple form from my class library,
then it uses ADDOBJECT to add a Grid from the class library and
Select/Cancel buttons to the form. After creating the grid, I loop through
the fields in the picklist and setup the columns in the grid. I use
BINDEVENT to provide the functionality to the click event of each button and
the dblclick event of the grid columns. This class has worked perfectly for
many years and is easy to use and include whenever I want a simple look up
for a single selection from the picklist by the user.
However, today I was trying to add some functionality to the class by adding
a checkbox in the first column of the grid to allow users to make multiple
selections from the picklist. Adding a 'Sel' field to the query and setting
the resulting cursor to READWRITE was easy enough. Displaying the checkbox
in the generated grid was also easy. I set the readonly propery for the
grid, the column and the checkbox to .f. and everything displays correctly
but no matter what I do, when I click on the checkbox, nothing happens.
I've confirmed the cursor is readwrite at runtime. I've monitored readonly
properties all the way to the moment the .show() method is called to display
the picklist form and they all are .f. until after the .show() method
executes. I've traced the code for all the parent elements and can find no
other place where any readonly properties are being set to .t.
My question is this: If I'm using ADDOBJECTS and BINDEVENT commands to
create this picklist form, do I need to create a procedure specifically for
the CLICK event of the checkbox to issue a DODEFAULT() command and then bind
that to the Click Event manually or will the checkbox just automatically use
the base CLICK event code from the parent class?
I haven't worked with ADDOBJECTS and BINDEVENT commands often (the last time
was probably when I wrote the original code for the picklist class I'm
trying to modify) and I'm not sure this makes sense, but after a couple of
hours failure, I decided to give up and ask for help.
Thanks in advance!
Paul H. Tarver
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---