![]() Wide-Angle Neutron Spin Echo Spectroscopy.S1.lastTime= datetime // seconds since Jan 1, 1904. S1.nclicks = 1 // update the structure members Printf "button %s clicked %d time(s), last click = %s\r",bStruct.ctrlName,s1.nclicks,ctime String ctime= Secs2Date(lastTime, 1 ) " " Secs2Time(lastTime,1) Variable lastTime= s1.lastTime // get a value from the structure. StructGet/S s1,erdata // unpack structure from userdata string. button has a structure packed into its userdata. ![]() Print "first click on " bStruct.ctrlName If( strlen(erdata) = 0 ) // button hasn't had userdata initialized STRUCT mystruct s1 // local user-defined structure Return 0 // we only handle mouse down (code=1) STRUCT WMButtonAction
0 Comments
Leave a Reply. |