|
#11
|
||||
|
||||
|
Quote:
it's not a big deal. Code:
var
...
mListBox : FListBox;
mListBoxItem: array of FListBoxItem;
...
procedure FMXInnoInit;
begin
...
mListBox := InitListBoxHandle;
...
end;
procedure InitializeWizard();
begin
...
FMXDesigning;
FMXForm.Show;
mListBox.SetItemIndex(2); // i-1
...
end;
procedure ListBoxOnChange(Sender: TObject);
begin
if mListBox.GetItemIndex > -1 then
WinTB1.Text('Selected Drive: [' + mListBox.GetItemText(mListBox.GetItemIndex) + ']');
end;
Code:
procedure FMXDesigning;
var
i, CDrvIdx: Integer;
ADrvLst: TArrWStr;
begin
...
if not wGetLogicalDriveList(ADrvLst, CDrvIdx) then
begin
Log('"wGetLogicalDriveList" failed!');
MsgBox('"wGetLogicalDriveList" failed!', mbError, MB_OK);
// try another way.
end;
{ ListBox }
mListBox.FCreate(FMXForm.Handle);
mListBox.SetBounds(NSX(32), NSY(53), NSX(297), NSY(249));
mListBox.OnChange(@ListBoxOnChange);
{ Items }
SetArrayLength(mListBoxItem, GetArrayLength(ADrvLst));
mListBox.BeginUpdate;
for i := 0 to GetArrayLength(ADrvLst) - 1 do
begin
mListBoxItem[i] := InitListBoxItemHandle;
mListBoxItem[i].FCreate(mListBox.Handle);
mListBoxItem[i].Text(ADrvLst[i]);
mListBox.AddItem(mListBoxItem[i].Handle);
end;
mListBox.EndUpdate;
...
end;
. Last edited by BLACKFIRE69; 14-07-2024 at 02:09. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows Fluent Effects Standalone API - InnoSetup / VCL / FXM | BLACKFIRE69 | Conversion Tutorials | 0 | 15-11-2023 17:35 |
| Windows Phone Installer similar to razor12911's original design? | Kitsune1982 | Conversion Tutorials | 0 | 02-07-2020 13:04 |
| INDEX - Conversion Tutorial Index | Razor12911 | Conversion Tutorials | 5 | 11-06-2020 02:05 |
| Frequently Asked Questions | Joe Forster/STA | PC Games - Frequently Asked Questions | 0 | 29-11-2005 09:48 |