Bonjour j'ai besoin d'un peu d'aide.
Je souhaite actualiser les changement effectués via TFolderTreeView. mes modification sont effective dans mon XMl mais pas dans mes fenetres personnalisées. Dans la page par default pour choisir le chemin d'installation, on vois bien le chemin changer dans le haut de la fenetre.
je voudrais en faire même dans cette page personnalisée
custom form:
customform pour naviguer
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59 SQLitepage := CreateCustomPage( wpInfoAfter, ExpandConstant('{cm:sqlite_title}'), ExpandConstant('{cm:sqlite_subtitle}')); SQLiteBitmapFileName := ExpandConstant('{tmp}\SQLite.bmp'); ExtractTemporaryFile(ExtractFileName(SQLiteBitmapFileName)); // SQLite image SQLiteBitmapImage := TBitmapImage.Create(SQLitepage); SQLiteBitmapImage.Top := ScaleY(3); SQLiteBitmapImage.Width := 110; SQLiteBitmapImage.Height := 65; SQLiteBitmapImage.AutoSize := True; SQLiteBitmapImage.Bitmap.LoadFromFile(SQLiteBitmapFileName); SQLiteBitmapImage.Parent := SQLitepage.Surface; // SQLIte info InfoLabel2 := TLabel.Create(WizardForm); InfoLabel2.Parent := SQLitepage.Surface; InfoLabel2.Top := SQLiteBitmapImage.Height + ScaleY(8); InfoLabel2.Width := SQLitepage.SurfaceWidth; InfoLabel2.Height := 40; InfoLabel2.AutoSize := False; InfoLabel2.Wordwrap := True; InfoLabel2.Caption := (ExpandConstant('{cm:sqlite_note}')); InfoLabel2.Parent := SQLitepage.Surface; // SQLIte info 2 InfoLabel3 := TLabel.Create(WizardForm); InfoLabel3.Parent := SQLitepage.Surface; InfoLabel3.Top :=SQLiteBitmapImage.Height + ScaleY(8) + InfoLabel2.Height + ScaleY(8); InfoLabel3.Width := SQLitepage.SurfaceWidth InfoLabel3.Height := 12; InfoLabel3.AutoSize := False; InfoLabel3.Wordwrap := True; InfoLabel3.Caption := (ExpandConstant('{cm:sqlite_folder}')); InfoLabel3.Parent := SQLitepage.Surface; // SQLite path SQLiteFolderPath := TEdit.Create(SQLitepage); SQLiteFolderPath.Top := SQLiteBitmapImage.Height + ScaleY(8) + InfoLabel2.Height + ScaleY(8) + InfoLabel3.Height + ScaleY(8); SQLiteFolderPath.Height := 8; SQLiteFolderPath.Width := SQLitepage.SurfaceWidth; SQLiteFolderPath.Text := LoadValueFromXML (XMLFile,'//MeedioPluginConfiguration[description/Entry/guid="890a71d1-5a72-494b-9c82-0f3da74ae833"]/plugin_properties/Entry[@Key="Path"]/string'); SQLiteFolderPath.ReadOnly := True; SQLiteFolderPath.Parent := SQLitepage.Surface; // SQLite Client CheckBox CheckBox := TNewCheckBox.Create(SQLitepage); CheckBox.Top := SQLiteBitmapImage.Height + ScaleY(8) + InfoLabel2.Height + ScaleY(8) + InfoLabel3.Height + ScaleY(8) + SQLiteFolderPath.Height + ScaleY(8); CheckBox.Width := SQLitepage.SurfaceWidth - 90; CheckBox.Height := 17; CheckBox.Caption := (ExpandConstant('{cm:sqlite_client}')); CheckBox.Checked := False; CheckBox.Parent := SQLitepage.Surface; // Browse button CancelButton := WizardForm.CancelButton; BrowseButton := TButton.Create(SQLitepage); BrowseButton.Top := SQLiteBitmapImage.Height + ScaleY(8) + InfoLabel2.Height + ScaleY(8) + InfoLabel3.Height + ScaleY(8) + SQLiteFolderPath.Height + ScaleY(8); BrowseButton.Left := CheckBox.Width + ScaleY(8); BrowseButton.Width := CancelButton.Width; BrowseButton.Height := CancelButton.Height; BrowseButton.Caption := 'Browse'; BrowseButton.OnClick := @BrowseButtonOnClick; BrowseButton.Parent := SQLitepage.Surface; CustomPageID2 := SQLitepage.ID;
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51 //============================================================ procedure FolderSelected(Sender: TObject); //============================================================ begin LibrariesPath := TFolderTreeView(Sender).Directory; end; //============================================================ procedure BrowseButtonOnClick(Sender: TObject); //============================================================ var Form: TSetupForm; Edit: TFolderTreeView; OKButton, CancelButton: TNewButton; SQLiteLibrariesPath: Tlabel; begin Form := CreateCustomForm(); try XMLFile := ExpandConstant('{app}\data\configuration.xml'); DefaultXMLFile := ExpandConstant('{app}\data\default_configuration.xml'); Form.ClientWidth := ScaleX(300); Form.ClientHeight := ScaleY(300); Form.Caption := (ExpandConstant('{cm:browse_sqlite_label}')); Form.CenterInsideControl(WizardForm, False); SQLiteLibrariesPath := TLabel.Create(Form); SQLiteLibrariesPath.Top := ScaleY(10); SQLiteLibrariesPath.Left := Scalex(10); SQLiteLibrariesPath.Height := 8; SQLiteLibrariesPath.Width := Form.ClientWidth - Scalex(20); SQLiteLibrariesPath.Caption := (ExpandConstant('{cm:browse_sqlite}')); SQLiteLibrariesPath.Parent := Form; Edit := TFolderTreeView.Create(Form); Edit.Top := SQLiteLibrariesPath.Height + ScaleY(20); Edit.Left := Scalex(10); Edit.Width := Form.ClientWidth - Scalex(20); Edit.Height := Form.ClientHeight - SQLiteLibrariesPath.Height - ScaleY(60); Edit.Enabled := True; Edit.OnChange := @FolderSelected; Edit.Parent := Form; OKButton := TNewButton.Create(Form); OKButton.Parent := Form; OKButton.Width := ScaleX(75); OKButton.Height := ScaleY(23); OKButton.Left := Form.ClientWidth - ScaleX(75 + 6 + 75 + 10); OKButton.Top := Form.ClientHeight - ScaleY(23 + 10); OKButton.Caption := 'OK'; OKButton.ModalResult := mrOk; OKButton.Default := True;
Partager