IonicWind Software

IWBasic => General Questions => Topic started by: splakidas on December 17, 2006, 03:49:02 PM

Title: Edit box notification
Post by: splakidas on December 17, 2006, 03:49:02 PM
I have 2 edit buttons with some values in them.
How can i be notified if one of this values change ?
Title: Re: Edit box notification
Post by: Ionic Wind Support Team on December 17, 2006, 03:55:37 PM
select @class
     case @IDCONTROL
          select @CONTROLID
                case EDIT1: 'or whatever ID you are using
                        if @NOTIFYCODE = @ENCHANGE
                           ...the contents of the control has changed
                        endif
           endselect
endselect

Title: Re: Edit box notification
Post by: splakidas on December 17, 2006, 03:59:34 PM
Paul is it ok if if read the value before focus and after loosing focus ?


CASE 1147
IF @NOTIFYCODE = @ENSETFOCUS then
valuebefore = val(getcontroltext(kxreosis,1147))
endif
IF @NOTIFYCODE = @ENKILLFOCUS then
valueafter= val(getcontroltext(kxreosis,1147))
endif
Title: Re: Edit box notification
Post by: splakidas on December 17, 2006, 04:11:02 PM
Paul i alredy used  @ENCHANGE but with  @ENCHANGE i get on every keypress a value.
If someone writes 150 so i get first 1 then 15 and last 150.
I want to have the 1st value (if there is one in the edit box) and the edit box looses focus or window is closed


CASE 1146
txt="" :  IF @NOTIFYCODE = @ENCHANGE then txt = getcontroltext(kxreosis,1146)


CASE 1147
txt=""
IF @NOTIFYCODE = @ENSETFOCUS then
txt = getcontroltext(kxreosis,1147)
print debug,txt
endif

IF @NOTIFYCODE = @ENKILLFOCUS then
txt = getcontroltext(kxreosis,1147)
print debug,txt
endif

Title: Re: Edit box notification
Post by: Ionic Wind Support Team on December 17, 2006, 04:29:41 PM
Whatever works for you ;).