![]() |
Menüeinträge sortieren
folgende Prozedur sortiert Menüeinträge in aufsteigender Reihenfolge ihrer Caption:
Delphi-Quellcode:
procedure SortMenuItems(source:TMenuItem);
var i, j, min : Integer; begin // Selection Sort for i := 0 to source.Count-2 do begin min := i; for j := i+1 to source.Count-1 do Begin if CompareStr(source.Items[j].Caption, source.Items[min].Caption) < 0 then min := j; End; source.Items[min].MenuIndex := i; end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:17 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz