Hi,
how can update all controls of a dialog ? oDlg:Refresh() does not work.
Stefan
Update all controls of a dialog
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Re: Update all controls of a dialog
Try oDlg:Update()StefanHaupt wrote:Hi,
how can update all controls of a dialog ? oDlg:Refresh() does not work.
Stefan
Regards !
Rimantas U.
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Update all controls of a dialog
Try adding UPDATE clause to the controls you want to refresh. Or use a loop through oDlg:aControls to refresh any single control.StefanHaupt wrote:Hi,
how can update all controls of a dialog ? oDlg:Refresh() does not work.
Stefan
EMG
Resuming:
1) Add the UPDATE clause to all your controls in your dialog:
REDEFINE GET oGet VAr xVar blah blah blah UPDATE
REDEFINE CHECKBOX oChk blah blah blah UPDATE
2) Whenever you want perfrom an update of all the controls inside a dialog, simply do a oDlg:Update(), and you are done.
3) Rember: the oDlg:Update() only works over the controls which have the UPDATE clause included.
1) Add the UPDATE clause to all your controls in your dialog:
REDEFINE GET oGet VAr xVar blah blah blah UPDATE
REDEFINE CHECKBOX oChk blah blah blah UPDATE
2) Whenever you want perfrom an update of all the controls inside a dialog, simply do a oDlg:Update(), and you are done.
3) Rember: the oDlg:Update() only works over the controls which have the UPDATE clause included.
Saludos
R.F.
R.F.
- carlos vargas
- Posts: 1421
- Joined: Tue Oct 11, 2005 5:01 pm
- Location: Nicaragua
I Use this modification to class in fivewin, only work with xharbour
at begin of the application
call the procedure OverrideAndExtend()
example
example of use
salu2
carlos vargas
at begin of the application
call the procedure OverrideAndExtend()
example
Code: Select all
function main()
...
OverrideAndExtend()
...
return
Code: Select all
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
Code: Select all
...
/*refresh control in a dialog*/
oDlg:RefreshDialog()
/*refresh a page dialog*/
oFolder:RefreshPages()
...
carlos vargas
Code: Select all
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
Carlos Vargas
Desde Managua, Nicaragua (CA)
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany