IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Outils Delphi Discussion :

[Inno Setup] besoin d'aide sur une CustomForm


Sujet :

Outils Delphi

  1. #1
    Candidat au Club
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Décembre 2011
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Technicien maintenance
    Secteur : Industrie

    Informations forums :
    Inscription : Décembre 2011
    Messages : 3
    Points : 3
    Points
    3
    Par défaut [Inno Setup] besoin d'aide sur une CustomForm
    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:
    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;
    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
        //============================================================
        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;
    Images attachées Images attachées   

  2. #2
    Membre expérimenté
    Avatar de ouiouioui
    Homme Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Août 2006
    Messages
    984
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Août 2006
    Messages : 984
    Points : 1 419
    Points
    1 419
    Par défaut
    bonjour,

    dans BrowseButtonOnClick il manque
    Edit.Directory := SQLiteFolderPath.Text;
    Il existe 3 sortes de gens: ceux qui savent compter et ceux qui ne savent pas.

  3. #3
    Candidat au Club
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Décembre 2011
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Technicien maintenance
    Secteur : Industrie

    Informations forums :
    Inscription : Décembre 2011
    Messages : 3
    Points : 3
    Points
    3
    Par défaut
    erf! j'obtiens une erreur de ce type quand je clique sur "browse"


    la procedure BrowseButtonOnClick est placée avant ma custom page, ça peut venir de la ?
    Images attachées Images attachées  

Discussions similaires

  1. [SQL] Besoin d'aide sur une requête
    Par Angath dans le forum Langage SQL
    Réponses: 2
    Dernier message: 17/01/2006, 16h26
  2. besoin d'aide sur une requette sql
    Par maxidoove dans le forum Langage SQL
    Réponses: 13
    Dernier message: 10/10/2005, 18h42
  3. Besoin d'aide sur une fonction
    Par PrinceMaster77 dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 30/08/2005, 17h40
  4. Réponses: 1
    Dernier message: 03/08/2005, 11h41
  5. Besoin d'aide sur une requête (JOIN + COUNT ?)
    Par PanzerKunst dans le forum Langage SQL
    Réponses: 2
    Dernier message: 01/06/2005, 10h29

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo