OnCreate ->OnShow ->OnPaint ->OnActivate ->OnDeactivate ->OnAfterShow ->OnCloseQuery ->OnClose ->OnHide ->OnDestro Noodzakelijk voor checken van form creation dates: $$$mginfoClassKeyGet(%class,%key) - Key: $$$cCLASStimechanged]]> 1 TCHUI.TFrame 0 TMenuItem $$$ftMain Subscherm, $$$ftSub Subscherm, $$$ftPopup, $$$ftDialog %String TControlBasis %Boolean 0 Wanneer de form zichtbaar is, nagaan of deze modal is %Boolean 0 %String TCHUI.TControl $$$NULLOREF TCHUI.TMenuItem $$$NULLOREF Options %Library.Boolean 1 Method OnCloseQuery(Sender As %String, CloseOk As %Boolean) %String Method OnShow(Sender As %String) %String Method OnHide(Sender As %String) %String Method OnDestroy(Sender As %String) %String Active:%Boolean Control:TControlBasis Control:TControlBasis Control:TControlBasis deze werd steeds uitgevoerd zonder te checken / of de huidige control de focus wel mag weggeven (onvalidate) - deze code mag later verwijderd worden als blijkt dat alles functioneert ;Indien active: ActiveControl zetten en SetFocus oproepen If ..Active Do . Do ..SetWindowFocus(Control) ;Indien niet, enkel ActiveControl vastleggen Else Do . Set ..ActiveControl=Control */ ]]> ActiveControl:TControlBasis CurControl:TCHUI.TControlBasis,GoForward:%Boolean=1 CurControl:TCHUI.TControlBasis="",GoForward:%Boolean=1 TCHUI.TControlBasis CtrlCnt) Nr=1 . Else Do .. Set Nr=Nr-1 .. Set:(Nr<1) Nr=CtrlCnt . Set CurControl=aTO(Nr) . Set:(CurControl.CanFocus() && CurControl.TabStop) NextCtrl=CurControl Quit NextCtrl ]]> 1e ctrl van form krijgt focus, anders krijgt FocusTo de focus ]]> FocusTo:TControlBasis="" geen reset nodig Quit:('$IsObject(..ActiveControl)) ;Huidig component terug initialiseren Set ..ActiveControl.FocusMode=$$$fmNone Set ..ActiveControl.FontSelect="" Set ..ActiveControl=FocusTo ]]> 1 %String Terminate, zoniet invisible+OnHide If %this=%Application.MainForm Do . Do %Application.Terminate() Else Do . Set ..Visible=0 . Do %Screen.InvalidateForm(%this,0,0) ;no paintall & no activate next window . Do %Application.TriggerSimpleEvent(..OnHide,%this) ;Bewaarde pagina terughalen Do %Screen.RefreshPage(%this) ;Alle forms terug inschakelen Do %Screen.EnableForms() ;Focus teruggeven aan laatste cmp Do %Application.ProcessSetFocus(LastActiveControl) Quit ..ModalResult ]]> PaintAll:%Boolean=1,ActivateNextForm:%Boolean=1 TCHUI.TButton ACaption:%String %Status ACaptionControl:%String %Status FontSelected Button:%String,Row:%Integer,Col:%Integer DoelType 0) Set ..Left=1+((%Screen.Width-..Width)\2) ]]> 0) Set ..Top=1+((%Screen.Height-..Height)\2) ]]> Sender:TControlBasis,KeyCode:%String initvalue:%CacheString %Status Controls... 1 Name,Caption,Top,Left,Height,Width,Font,FormType TControl Name,Caption,Top,Left,Height,Width,Font,FormType Sender:%String,CloseOk:%Boolean