this is code from a callback funtion to respond to a button click. the code grabs string DMS from textbox1 just fine. Next function DMStoD(DMS) returns a modifed (different) string which now should be written to textbox2. That works fine too the first time through. The problem is that each time I press this button, textbox2 does not refresh/erase ... it just piles the new text on top of the old. The help file says it will "replace" the text when you use set text. In fact, it seems to just write over it ... makes a mess on the screen... help please! ???? I want textbox2 to clear and take a new value each time the button is pressed.
CASE %IDC_BUTTON1
IF CBCTLMSG = %BN_CLICKED OR CBCTLMSG = 1 THEN
CONTROL GET TEXT CBHNDL, %IDC_TEXTBOX1 TO DMS
CONTROL SET TEXT CBHNDL, %IDC_TEXTBOX2, DMStoD(DMS)
END IF
CASE %IDC_BUTTON1
IF CBCTLMSG = %BN_CLICKED OR CBCTLMSG = 1 THEN
CONTROL GET TEXT CBHNDL, %IDC_TEXTBOX1 TO DMS
CONTROL SET TEXT CBHNDL, %IDC_TEXTBOX2, DMStoD(DMS)
END IF
Comment