>>I have a grid with one column controled by checkbox. The checkbox alignment property only allows Left or Right, which can make the checkbox shown on left side or right side of the field. How can I make it to the center? Do I have to put the checkbox in a container to center it?
>>
>>Thanks
>>
>>Wei Lin
>
>See Forum: Visual FoxPro Category: Forms & Form designer Title: DownArrow in Centered Checkbox in Grid Thread #
577753 Message #
577753Thanks for the response. It seems I have to use a container. I wonder why VFP does not have a 'center' in addition to 'left' and 'right' to the checkbox's alignment property.
What I is trying to do is to create a MyCheckBox which uses a checkbox enclosed by a container and centers the checkbox as what is mentioned in Thread #
577753. However, I get a couple of problems:
1. In design mode, I cannot drag-drop MyCheckBox to the column. VFP gives me an error message - "Cannot add this object to a grid", if I do so. I have the bound property set to false, and I can drop container or checkbox into a column. VFP grid does not take drived container class?
2. I can use addobject to add MyCheckBox to the column, and MyCheckBox seems working fine. I can use mouse to click and unclick the centered checkbox. But the key board does not get correct response. It seems the CheckBox does not get key-press message. Any idea where I did wrong?