Gadget-obj
LabTalk Object Type:
The Gadget Object is derived from the Graphic Objects from which it inherits methods and properties. To declare a gadget variable, you should do as follows:
addtool_quickfit; //execute XF to create gadget gadget gg = rect; //"rect" is the object name shown in the Object Name text box in the Programming Control dialog box
gadget name.Method(arguments)
Option can have 3 choices: 0-remove, 1-replace (default), 2-add; If PlotIndex=0, it means to deselect(option=0)/select(option=1,2) all.
//assume there is a graph with a plot from row number data. addtool_rise_time; //execute XF to create gadget gadget gg = rect; //declare LT gadget variable gg.x=15; //move to some place gg.x1=5; //change the size of the ROI gg.output(); //output result at current position gg.x=20; //move again gg.gettree(trgui); //get gui settings tree trgui.roi.rectcolor=5; //change the ROI fill color gg.settree(trgui); //apply gui changes to the gadget gg.expand(); //expand ROI to full range gg.output(); //output result at current position tree mytr; //define a tree variable gg.getresult(mytr); //output result to the tree variable mytr mytr.=; //view the tree variable