Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difficulty viewing grid cell when it doesn't have focus
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00064608
Message ID:
00064630
Views:
47
>I have a container in a grid column (that has sparce=.t.) that has a button and an edit box. The purpose of the container is so that when sparce=.t. the button and the editbox show at the same time when the row (specifically the row and the column) has focus. Otherwise if I put the button and the editbox in separate columns the user can see one and not the other.
>
>The problem is that when that cell does not have focus, the text from the edit box is not shown.
>
>* The editbox in the container has a controlsource = some memo field
>* The column has a control source = a 28 byte character field which is left(memo field, 28) upon validation of the editbox.
>* Sparce = .f.
>
>The problem does not show up when I have JUST the editbox in the column (ie I can see the full memo when the cell has focus and I can see first 28 letters when cell doesn't have focus). The problem only seems to show up when the editbox is inside a container object (which amazingling enough work inside a grid--except for this case).
>
>I am wondering if foxpro somehow derives the controlsource for the cell (when the cell does not have focus) based on the control source for the control when the cell does have focus. If this is the case, then the container, which has no controlsource would be messing things up.

From VFP help on Sparse:
"True (.T.) (Default) Only the Column’s active cell uses the CurrentControl property setting to accept and display data. The other cells use the TextBox control if the current control for the cells is not the container object or a command button. The other cells remain empty if the current control for the cells is the container object or a command button."

I think that by putting both controls in the grid column (container and text box), it will show the text box when the focus is not on the column
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform