Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DownArrow in Centered Checkbox in Grid
Message
From
02/04/2002 14:44:09
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
To
02/04/2002 12:09:08
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00577753
Message ID:
00640050
Views:
28
>>>>I have a subclass of my grid class, w/the checkbox already added to the grid. Why don't you try that and see if it works for you...you might discover something new about your problem.
>>>>
>>>>J
>>>
>>>
>>>I think I lost here. Do you say that you have a subclassed grid with a checkbox in its column? Is this checkbox wrapped by a container? Could you give me a little detail? Thanks.
>>>
>>>WL
>>
>>Wei,
>>
>>Yes, I have a visually sub-classed grid, grdBase, to which I have added some basic fucntionality. And I have a sub-class of that grid, with one column that is my check box in a container.
>>
>>J
>
>Hi, Jill. Thanks again for the response. I do not see putting MyCheckBox (wrapped by a container) into a grid class makes any difference, and I got the same problems when I did that. Could you tell me the following:
>

Wei,

>1. Does the space key work on the checkbox in the grid? Mine does not (pressing space key won't check/uncheck the box).

yes, the space key works normally for me.


>2. How did you put the checkbox into the column? Using addobject(...) at init()?

no. I added it in the Class Designer, visually, at design time, not run time. I have my base grid class, grdBase. I subclassed grdBase and called it grdSelection. I open my grdSelection class in the class designer, set ColumnCount to 1 and added my cntGridCheckBox (container w/a centered check box) to column1. I removed the default textbox from column1; that sets the CurrentControl for the column to be the checkbox.

To do this (from VFP 6 help):

"In the Properties window, select the parent column for the
control from the Object box.

For example, select Column1 to add a control to Column1. The border of the grid changes to indicate that you are editing a contained object when you select the column.

Select the desired control on the Form Controls toolbar and click in the parent column.

The new control will not be displayed in the grid column in the Form Designer, but it will be visible at run time.

In the Properties window, make sure the control is displayed indented under the parent column in the Object box.

If the new control is a check box, set the Caption property of the check box to " " and the Sparse property of the column to false (.F.)."


>3. What else you did at grid regarding to the added checkbox?

The only other thing I did, in the grid was in the resize method of column1, I call This.CNTGRIDCHECKBOX1.Resize().

Oh, and I force the checkbox to NOT be readOnly...could your checkbox have readOnly= .T.? Could that be your problem?

J
Previous
Reply
Map
View

Click here to load this message in the networking platform