Delphi 2010 RibbonApplicationMenuBarの最近のアイテムをファイルに読み書きする方法
質問
RibbonApplicationMenuBar
の最近のアイテムをファイルまたはINIファイルに読み書きするにはどうすればよいですか
ヘルプファイルは、最近のアイテム文字列のリストを取得して、最近のアイテムを保存および再ロードするのにあまり役立ちません。 Ribbon1.AddRecentItem(APathFilename)
によってアイテムを最近のアイテムリストに追加し、 RecentItemClick
イベントで最近のアイテムに関連付けられたファイルを開くことができますが、どうすればよいかわかりません最近のファイル名を最近のアイテムリストに保存して再読み込みします。
解決
TRibbonApplicationMenuBar には提供する RecentItems プロパティリストへのアクセスa href = "http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/RibbonActnMenus_TOptionItem.html" rel = "nofollow noreferrer">各最近のアイテム。
>// example code - untested.
RibbonApplicationMenuBar1.RecentItems.Items[1].Caption;
各アイテムをループする別の例。
// example code - untested.
var
count : Integer;
begin
For count := 1 to RibbonApplicationMenuBar1.RecentItems.Items.Count do
begin
ShowMessage(RibbonApplicationMenuBar1.RecentItems.Items[count].Caption);
end;
end;
所属していません StackOverflow