Anusha
03-25-2004, 02:23 AM
Dear All
I have a requirement in which on double click event of a button, say Button1, a floating list will appear and in that floating list I will be having a text box and a OK Button. After providing some text value in the text box and on press of the OK button the text box value is set to the Button1.
Now on single click of Button1, I need to populate another button say ChildButton. Similar to that of Button1, I will populate the floating list and provide value to the ChildButton.
I am attaching the code snippet which I have coded for this purpose.
The problem now is that the, value entered in the second button textbox get's into the first button value.But it should not happen in that way,only the value entered in the firstbutton text box should get entered into it's button value.For me it's happening in the reverse way...any solutions plz.
code :
---------
<canvas height="700" debug="true">
<class name="SpecialButton" extends="button" onclick="changeLabel()">
<method name="changeLabel">
debug.write(textbox.getText());
b1.setAttribute('text', textbox.getText() );
</method>
</class>
<class name="sbutton" extends="button" >
<attribute name="nextX" value="0"/>
<attribute name="nextY" value="0"/>
<fflist name="flist" />
<method event="onclick">
var foo = new cbutton( canvas, {text:'popupbutton' ,name:'popupbutton', y:60} );
</method>
<method event="ondblclick">
flist.setVisible(!flist.visible);
</method>
</class>
<class name="cbutton" extends="button" >
<attribute name="nextX" value="0"/>
<attribute name="nextY" value="0"/>
<fflist name="flist" />
<method event="ondblclick">
flist.setVisible(!flist.visible);
</method>
</class>
<class name="fflist" extends="floatinglist" attach="right" width="68" visible="false">
<edittext id="textbox" ></edittext>
<SpecialButton> OK </SpecialButton>
</class>
<sbutton text="Anusha" name="b1" x="20" y="10" />
</canvas>
---Anush
I have a requirement in which on double click event of a button, say Button1, a floating list will appear and in that floating list I will be having a text box and a OK Button. After providing some text value in the text box and on press of the OK button the text box value is set to the Button1.
Now on single click of Button1, I need to populate another button say ChildButton. Similar to that of Button1, I will populate the floating list and provide value to the ChildButton.
I am attaching the code snippet which I have coded for this purpose.
The problem now is that the, value entered in the second button textbox get's into the first button value.But it should not happen in that way,only the value entered in the firstbutton text box should get entered into it's button value.For me it's happening in the reverse way...any solutions plz.
code :
---------
<canvas height="700" debug="true">
<class name="SpecialButton" extends="button" onclick="changeLabel()">
<method name="changeLabel">
debug.write(textbox.getText());
b1.setAttribute('text', textbox.getText() );
</method>
</class>
<class name="sbutton" extends="button" >
<attribute name="nextX" value="0"/>
<attribute name="nextY" value="0"/>
<fflist name="flist" />
<method event="onclick">
var foo = new cbutton( canvas, {text:'popupbutton' ,name:'popupbutton', y:60} );
</method>
<method event="ondblclick">
flist.setVisible(!flist.visible);
</method>
</class>
<class name="cbutton" extends="button" >
<attribute name="nextX" value="0"/>
<attribute name="nextY" value="0"/>
<fflist name="flist" />
<method event="ondblclick">
flist.setVisible(!flist.visible);
</method>
</class>
<class name="fflist" extends="floatinglist" attach="right" width="68" visible="false">
<edittext id="textbox" ></edittext>
<SpecialButton> OK </SpecialButton>
</class>
<sbutton text="Anusha" name="b1" x="20" y="10" />
</canvas>
---Anush