Hi,
how can update all controls of a dialog ? oDlg:Refresh() does not work.
Stefan
StefanHaupt wrote:Hi,
how can update all controls of a dialog ? oDlg:Refresh() does not work.
Stefan
StefanHaupt wrote:Hi,
how can update all controls of a dialog ? oDlg:Refresh() does not work.
Stefan
function main()
...
OverrideAndExtend()
...
return
PROCEDURE OverrideAndExtend()
OVERRIDE METHOD DispBegin IN CLASS TWindow WITH KDispBegin
OVERRIDE METHOD DispEnd IN CLASS TWindow WITH KDispEnd
EXTEND CLASS TFOLDER WITH METHOD RefreshPages
EXTEND CLASS TFOLDER WITH METHOD GoFirstControl
EXTEND CLASS TDIALOG WITH METHOD RefreshDialog
RETURN
STATIC FUNCTION KDispBegin()
LOCAL SELF := HB_QSelf()
RETURN SELF
STATIC FUNCTION KDispEnd()
LOCAL SELF := HB_QSelf()
RETURN NIL
STATIC FUNCTION RefreshDialog( nPos )
LOCAl Self := HB_QSelf()
aeval( ::aControls, { |oCtrl| oCtrl:Refresh() } )
if nPos <> NIL .and. valtype( nPos ) = "N"
::aControls[ nPos ]:SetFocus()
endif
RETURN NIL
STATIC FUNCTION RefreshPages()
LOCAl Self := HB_QSelf()
LOCAL oPage
FOR EACH oPage IN ::aDialogs
aeval( oPage:aControls, { |oCtrl| oCtrl:Refresh() } )
NEXT
RETURN NIL
STATIC FUNCTION GoFirstControl()
LOCAL SELF := HB_QSelf()
::aDialogs[1]:aControls[1]:SetFocus()
RETURN NIL
...
/*refresh control in a dialog*/
oDlg:RefreshDialog()
/*refresh a page dialog*/
oFolder:RefreshPages()
...
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 38 guests