Favoritesmenu

TFavorites is a delphi-component that makes it easy to add a favorites menu to a webbrowser application. 

 

Drop the component and a mainmenu-component on a form. Set Favoritesmenu's Mainmenu-property to your mainmenu and add a single line of code:

procedure TForm1.FormCreate(Sender: TObject);
begin
FavoritesMenu1.CreateMenu;
end;

 

Options:

  • AddFavorites
    Add menuitem to invoke the standard Add Favorites dialog box.

  • OrganizeFavorites
    Add menuitem to invoke the standard Organize Favorites dialog box.

  • ImportFavorites
    Add menuitem to invoke the standard Import Favorites dialogbox. This option is ignored, if IE 5 or higher is not installed on the computer.

  • ExportFavorites
    Add menuitem to invoke the standard Export Favorites dialog box. This option is ignored, if IE 5 or higher is not installed on the computer.

Properties:

  • Caption
    Menutitle to appear in mainmenu. (Default: Localized).

  • MenuPos
    Where to place the Favorites-menu in mainmenu.

  • MainMenu
    Your mainmenu (ex. MainMenu1)

  • Webbrowser
    The Webbrowser control (ex. EmbeddedWb1).

  • Localization
    Set Caption for menuitems selected in Options.

  • MaxWidth
    Set Maximum menu-width (Default app. 50 chars, similar to IE).

  • ResolveUrl
    Choose how you want Url from Internet Shortcuts to be retrieved - using IUniformResourceLocator (IntShCut) or IniString. MS recommand IUniformResourceLocator since the internal structure of the .url-files may change in the future, but some have reported difficulties with IURL on Windows  NT.

  • Channels
    Includes channels in the menu if TRUE. Channels are resolved, but IE opens and execute the .cdf-file. 

Events:

  • OnUrlSelected(Sender : TObject; Url: String);
    If OnUrlSelected is assigned the webbrowser control will not automatically navigate to URL.

 

 

 

Feel free to contribute your enhancements and/or bug fixes...

NB: Ver 1.01 has only been tested in Delphi 5. Please e-mail me a copy for upload, if you modify the component for Delphi 3 or 4!

Enjoy!



 Ver. 0.97 (Sept. 8 1999):

Fixed memory-leak problems.
Use of IntShCut is now optional.
Updates for Delphi 5.


Ver. 1.00 (December 27 1999)

Component rewritten by Pete Morris. He has also added new component TFavoritesTreeView. 

Ver. 1.01 (July 25 2000)

Component rewritten by Per Lindsų Larsen. Use of  systemimagelist and dynamically created submenus speeds it up. Now also resolving channels and linkfile.

Thanks to Pete Morris and Rob Young for contributions.


Download Favorites ver. 1.01

Favorites v. 1.01  for Delphi 5
IECommon 1.00 (IEConst & IEUtils) 
Favorites v. 1.00  for Delphi 4 & 5 (incl. FavoritesTreeView) 

Created and maintained by
Per Lindsų Larsen

Last Update: Juli 27, 2000