PDA

View Full Version : Format logical field in browse


ABC123

whanigsberg
08-05-2000, 07:00 AM
I almost added this to John Walsh's checkbox thread as it deals with the same issue in a slightly different manner. I dispense with displaying the logical field and show its status by shading the row. If the row is shaded the value in the logical field is true.

Clicking on the row toggles the value in the field back and forth.

The field must be in the browse. Just shove it to the extreme right where users don't see it.

The same double click changes the value of another field as well. I left that in to show the potential for doing so.

-----------------------------------------
'Toggle value of a logical field and communicate its value by shading the row.
'Evades theissue of how to format logical fields in a browse


'Code for row_dbl_click event of embedded browse
'statement_date is a form level variable
this:Clr.value=.not.this:Clr.value
this:Clear_date.value=statement_date
parent.commit()


'Format expression is applied to all fields displayed in the browse
IF(CLEARED=.T.,"black on gray", "black on white")

'To avoid confusion, note that "clr" is the name of the column in the browse and "cleared" is the name of the field in the table.

'Not very bright of me, I admit. Can't imagine what I could have been thinking!


Bill