BALA Posted February 2, 2007 Share Posted February 2, 2007 (edited) I want to add additional text to a label, rather than replace the text already in the label. I was thinking of using GUICtrlSetData, but that seems to just erase the current text, then replace it with the text you specify.For example, if a label contains "Hel" , I want to be able to add "lo" to it to create the word "Hello." Edited February 2, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
_Kurt Posted February 2, 2007 Share Posted February 2, 2007 GUICtrlSetData($label, GUICtrlRead($label) & "this is text added to label") (Untested) Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
BALA Posted February 2, 2007 Author Share Posted February 2, 2007 (edited) GUICtrlSetData($label, GUICtrlRead($label) & "this is text added to label")oÝ÷ ÙIízË^t««·ú®¢×¶¸vØb±«¢+Ø¥¹±Õ±ÐíÕ¥ ½¹ÍѹÑ̹ÔÌÐì()U% ÉÑ ÅÕ½ÐíQÍÐÅÕ½Ðì°ÈÀÀ°äÀ¤)U%MÑMÑÑ ¤((ÀÌØí±°ôU% Ñɱ ÉÑ1° ÅÕ½Ðí%¹ÁÕйյÈå½Ôݽձ±¥Ñ¼Ñ½ÈèÅÕ½Ðì°ÄÀ°ÄÀ¤)U% ÑɱMÑÑ ÀÌØí±°°U% ÑɱI ÀÌØí±°¤µÀìÅÕ½ÐíÑ¡¥Ì¥ÌÑáÐѼ±°ÅÕ½Ðì¤(ÀÌØíÉôU% ÑɱI ÀÌØí±°¤()5Í ½à À°ÅÕ½ÐíÑÍÐÅÕ½Ðì°ÀÌØí±°¤ It seemed to work, but i wonder why the message box says three. Edited February 2, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
_Kurt Posted February 2, 2007 Share Posted February 2, 2007 Because you didn't read the label, therefore it would be something like this: MsgBox(0, "test", GUICtrlRead($label)) Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Helge Posted February 2, 2007 Share Posted February 2, 2007 What do you expect it to say then ? The text ? BALA, BALA, BALA.... After all this time ? Link to comment Share on other sites More sharing options...
xcal Posted February 2, 2007 Share Posted February 2, 2007 $label = GUICtrlCreateLabel $label would be holding the control id. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
_Kurt Posted February 2, 2007 Share Posted February 2, 2007 What do you expect it to say then ? The text ? BALA, BALA, BALA.... After all this time ?Hehe, don't worry about it BALA, sometimes I make similar silly mistakes. Sometimes all it takes is reviewing each line of the script and asking yourself "What did I do wrong?".Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
_Kurt Posted February 3, 2007 Share Posted February 3, 2007 Sorry to bump an old post, but I just remembered that adding a 1 parameter to GUICtrlSetData won't "delete" any of the previous text: GUICtrlSetData($myedit, "this is a test adding to a label using the 1 parameter", 1) I wasn't completely awake when I had responded to this, sorry I had given you false information (although it did infact work). Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now