Datagrid Custome behavior issue
Posted: Tue Aug 01, 2017 7:29 pm
I have edited a datagrid to put a strike through on some lines, and this works great on every windows based computer except 1, on 1 of the computers after you select 1 line and then another line, the first line becomes invisible. Its still there and you can still click on it. and when you hilite it you can read it again. any idea whats going on? here is my script in the datagrid.
Code: Select all
--> all handlers on FillInData pData -- This message is sent when the Data Grid needs to populate -- this template with the column data. pData is the value to be displayed. set the text of me to pData SetStrikeOut end FillInData on LayoutControl pControlRect -- A default column is just a field. end LayoutControl setprop dgHilite pBoolean -- This custom property is set when the highlight of your column template has -- changed. You only add script here if you want to customize the highlight. if pBoolean then set the foregroundcolor of me to the dgProp["hilited text color"] of the dgControl of me else SetStrikeOut end if end dgHilite private command SetStrikeOut if GetDataOfIndex(the dgIndex of me, "line has error") then set the textStyle of me to strikeout else set the textStyle of me to plain end if end SetStrikeOut getprop dgDataControl -- Required by library so that it can locate the control. return the long id of me end dgDataControl -- Data grid will call this if a user action asks to edit cell content. command EditValue -- word 1 to -2 because of 0001 that is added to control name EditFieldText the long id of me, the dgIndex of me, word 1 to -2 of the short name of me end EditValue on mouseDoubleUp pMouseBtnNum if pMouseBtnNum is 1 then if the dgProps["allow editing"] of the dgControl of me \ and the dgColumnIsEditable[the dgColumn of me] of the dgControl of me then -- Edit field contents if the user double-clicks EditCellOfIndex the dgColumn of me, the dgIndex of me exit mouseDoubleUp end if end if pass mouseDoubleUp end mouseDoubleUp