Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange behavior putting 2 lines on a grid.

Status
Not open for further replies.

baseballgem

Programmer
Oct 3, 2001
54
US
I am using VFP8.

I empoyed the editbox for my grid.
The source was not text1 but editbox1.
The data is the concatination of a license number and the expiration date.

I put information like
License_No+chr(13)+Lic_ExpireDate

Sometimes the grid acts fine but at other times I see only one piece of information. If I click the (read only) field then one sees both lines. In fact the whole column then reveals license and expiration. (2 separate lines) When clicking to other fields and scolling down I may see both elements and then again I may see only the license_no. Until, of course you click again in that box.

I keep telling users it's an occasional quirk, but to be aware if you need license info. to click in the field. They ask why? And I have no explanation.

The sparse behavior has nothing to do with it. Scroll bars is 0. The read only, background color or control source doesn't seem to have any bearing on it either. I hate inconsistancies with no explanation. Any Suggestons?

 
You say that the Sparse setting has nothing to do with it, but what do you have it set to? If it's .T., then you only actually see the EditBox when the cell has focus. The rest of the time, you only see the column itself. Also, have you increased the grid's RowHeight so that you have rows high enough to show two lines? Where did you set the ControlSource? Was it for the EditBox or the Column?



-BP
 
The sparse is .f. I can see all the rows at a glance. It's just that sometimes I glance and see the license number only.

The row height is plenty high enough. I also was wondering if anyone had ever seen this behavior.

Ar run time I have the grid and I "addobject" method the editbox to the grid. And then I set the property of it's contol source to the data at that point. I don't set the column control at all.
 
You may want to try to set the Column's ControlSource instead of the EditBox, but actually, if Sparse is .F., I wouldn't expect that to make a difference. I haven't seen anything like this, and can only guess that something is changing the data or the record pointer behind the scenes.



-BP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top