Status bar behaviour
Publicado: Mar Mar 15, 2005 6:26 pm
Hi,
I want to mimic the green/red light of Xailer IDE when a file is modified.
in the OnInitialize method I use
// Status bar
WITH OBJECT ::oBackStatus
:oImageList:Add( "BMP_LANGUAGE" )
:oImageList:Add( "BMP_CHG_ON" )
:oImageList:Add( "BMP_CHG_OFF" )
:aItems[ tSTATUS_LANG ]:nImage := 1
END WITH
in another method which checks changes to form controls I use
METHOD BackChanged( lSet ) CLASS TBackup
IF ( lSet )
IF !( ::FlChanged )
::FlChanged := TRUE
::oBackStatus:aItems[ tSTATUS_MODIFIED ]:nImage := 3
IF !( ::oBtnSave:lEnabled )
::oBtnSave:lEnabled := TRUE
IF ( ::FnStatus == tSTATUS_EDIT )
::oBtnUndo:lEnabled := TRUE
ENDIF
ENDIF
ENDIF
::oTxtOutputResult:cText := ::FoSet:cBackupFileNameX
ELSE
::FlChanged := FALSE
::oBackStatus:aItems[ tSTATUS_MODIFIED ]:nImage := 2
::oBtnSave:lEnabled := FALSE
::oBtnUndo:lEnabled := FALSE
ENDIF
RETURN Nil
Everything works ok except that the image in the status bar panel is not
shown at all.
Any hints on this ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
I want to mimic the green/red light of Xailer IDE when a file is modified.
in the OnInitialize method I use
// Status bar
WITH OBJECT ::oBackStatus
:oImageList:Add( "BMP_LANGUAGE" )
:oImageList:Add( "BMP_CHG_ON" )
:oImageList:Add( "BMP_CHG_OFF" )
:aItems[ tSTATUS_LANG ]:nImage := 1
END WITH
in another method which checks changes to form controls I use
METHOD BackChanged( lSet ) CLASS TBackup
IF ( lSet )
IF !( ::FlChanged )
::FlChanged := TRUE
::oBackStatus:aItems[ tSTATUS_MODIFIED ]:nImage := 3
IF !( ::oBtnSave:lEnabled )
::oBtnSave:lEnabled := TRUE
IF ( ::FnStatus == tSTATUS_EDIT )
::oBtnUndo:lEnabled := TRUE
ENDIF
ENDIF
ENDIF
::oTxtOutputResult:cText := ::FoSet:cBackupFileNameX
ELSE
::FlChanged := FALSE
::oBackStatus:aItems[ tSTATUS_MODIFIED ]:nImage := 2
::oBtnSave:lEnabled := FALSE
::oBtnUndo:lEnabled := FALSE
ENDIF
RETURN Nil
Everything works ok except that the image in the status bar panel is not
shown at all.
Any hints on this ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy