Delphi 2010 RibbonApplicationMenubar 최근 항목을 파일에 읽고 쓰는 방법

StackOverflow https://stackoverflow.com/questions/1402373

  •  05-07-2019
  •  | 
  •  

문제

당신은 어떻게 읽고 쓰나요? RibbonApplicationMenuBar 최근 파일 또는 INI 파일의 항목?

도움말 파일은 최근 항목을 저장하고 다시로드하기 위해 최근 아이템 문자열 목록에 들어가는 데별로 도움이되지 않습니다. 최근 항목 목록에 항목을 추가 할 수 있습니다. Ribbon1.AddRecentItem( APathFilename) 그리고 최근 항목과 관련된 파일을 RecentItemClick 이벤트이지만 최근 파일 이름을 최근 항목 목록에 저장하고 다시로드하는 방법을 알 수 없습니다.

도움이 되었습니까?

해결책

그만큼 TribbonApplicationMenubar a 최근 시합 a에 대한 액세스를 제공하는 속성 목록최근의 항목.

// 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;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top