OnCommandStateChange
NewsProductsDownloadsSupportForumCredits

TEmbeddedWB 
History 
HtmlEdit 
TIEAddress 
TIEDownload 
TIEDownloadManager 
IEGuid 
TIEParser 
Favorites 
TIESecurityManager 
IE5Tools 
TIETravelLog 
TLinksBar 
Protocols 
TRichEditWB 
TWebUpdater 
ResourceTool 
UI - lessParser 
Delphi Links 

 

 

[Home][Support][TEmbeddedWB][Events][OnCommandStateChange]


OnBeforeNavigate2OnCommandStateChangeOnDocumentCompleteOnDownloadBeginOnDownloadCompleteOnFullScreenOnGetExternalOnGetHostInfoOnGetOptionKeyPathOnMenuBarOnNavigateComplete2OnNavigateErrorOnNewWindow2OnQuitOnProgressChangeOnPropertyChangeOnScriptError EventOnShowContextMenuOnShowDialogOnShowHelpOnShowMessageOnStatusBarOnStatusTextChangeOnTheaterModeEventOnTitleChangeOnToolbar EventOnTranslateAcceleratorOnTranslateUrlOnUpdateUIOnVisible

 

OnCommandStateChange

 

OnCommandStateChangeWrite an OnCommandStateChange event handler to manage your application controls. This event fire as the result of certain methods changes, or when the user clicking on a link.
In simple words, here is the place to Enable your back and forward navigation buttons.
For example, if you load your browser, the back button should be disable since there is no URL address to navigate back to.  After the first navigation, this button should be enable for one click only, and so on.
:-

The Command arguments is one of:
type TCommandStateChangeConstants =(
    CSC_UPDATECOMMANDS = $FFFFFFFF,
    CSC_NAVIGATEFORWARD = $000000001,
    CSC_NAVIGATEBACK = $00000002);

Details:
CSC_UPDATECOMMANDS

The state of one of the toolbar buttons may have changed. Check status of each toolbar button relevant to your application and whether the toolbar is visible.
CSC_NAVIGATEFORWARD
Indicates whether there is "forward" history.
CSC_NAVIGATEBACK
Indicates whether there is "backwards" history.



 
procedure TbrowserFrm.WB1CommandStateChange(Sender: TObject; Command: Integer;
  Enable: WordBool);
begin
   case Command of
        CSC_NAVIGATEBACK : btnBack.Enabled  := Enable;
        CSC_NAVIGATEFORWARD : btnForward.Enabled := Enable;
     end;
end;

[Home][News][Products][Downloads][Support][Forum][Credits]

Copyright (c) 2005 bsalsa productions. All rights reserved.

bsalsa@bsalsa.no-ip.info