DataGrid and option menu

Yves COPPE yvescoppe at skynet.be
Sat Apr 11 15:43:02 EDT 2009


Hi List, Hi Trevor


Your tips help good but


I've placed the following script in the column behavior script of the  
column where are the option menu btn


the column name is "Prctge"

on FillInData pData
    lock messages
    set the menuHisory of btn 1 of me to lineoffset(pData, the text of  
btn 1 of me)
    unlock messages
end FillInData


getprop dgDataControl
    return the long id of me
end dgDataControl

on menuPick pChosenitem
    setDataOfIndex the dgIndex of me, the dgColumn of me, pChosenitem
end menuPick

if I ask

   put the dgHilitedLines of group "DataGrid 2" into theLine
    put the dgDataOfLine[theLine] of group "DataGrid 2" into theDataA
    answer theDataA["Prctge"]	
then i get the correct value of option menu btn of this line

BUT

whan I quit the stack and open the stack again, then the values of all  
the btns on each line of the colum are reset to the first line  
(menuHistory 1)

How can i retain the menuHistory of each line of the column with the  
option menu btn ??

Thanks.

Greetings.

Yves COPPE
yvescoppe at skynet.be




More information about the Use-livecode mailing list