Index: AAPClient/UI/DrieKnoppenScherm.pas =================================================================== diff -u -r139 -r142 --- AAPClient/UI/DrieKnoppenScherm.pas (.../DrieKnoppenScherm.pas) (revision 139) +++ AAPClient/UI/DrieKnoppenScherm.pas (.../DrieKnoppenScherm.pas) (revision 142) @@ -46,7 +46,7 @@ fUiContext: TUiContext; protected function ComputerName: String; - function ToonPopupScherm(Melding, Actie1: String; Actie2: String = ''; isVraag: boolean = false): TModalResult; + function ToonPopupScherm(Melding, Actie1: String; Actie2: String = ''; isVraag: boolean = false; ImageIndex1: integer = -1; ImageIndex2: integer = -1): TModalResult; public property UiContext: TUiContext Read fUiContext Write fUiContext; end; @@ -122,22 +122,44 @@ end; end; -function TfmDrieKnoppenScherm.ToonPopupScherm(Melding, Actie1: String; Actie2: String = ''; isVraag: boolean = false): TModalResult; +function TfmDrieKnoppenScherm.ToonPopupScherm(Melding, Actie1: String; Actie2: String = ''; isVraag: boolean = false; ImageIndex1: integer = -1; ImageIndex2: integer = -1): TModalResult; var PopupScherm: TfmPopupScherm; begin PopupScherm := TfmPopupScherm.Create(self); PopupScherm.lblWaarschuwing.Caption := Melding; PopupScherm.pnlbtnActie1.Caption := Actie1; + + //indien nodig twee textknoppen zichtbaar maken if Actie2 <> '' then begin PopupScherm.pnlbtnActie1.Width := 134; PopupScherm.pnlbtnActie2.Visible := True; PopupScherm.pnlbtnActie2.Caption := Actie2; + PopupScherm.imgActie1.Left := 35; + PopupScherm.imgActie2.Left := 35; end; + + //grote image in het midden kiezen if isVraag then PopupScherm.imgVraagteken.Visible := true else PopupScherm.imgUitroepteken.Visible := true; + + //indien nodig de knoppen vergroten en een image laden + if ImageIndex1 >= 0 then begin + PopupScherm.pnlbtnActie1.Top := PopupScherm.pnlbtnActie1.Top - 60; + PopupScherm.pnlbtnActie1.Height := PopupScherm.pnlbtnActie1.Height + 60; + fImagesScherm.ilAlgemeen64.GetIcon(ImageIndex1, PopupScherm.imgActie1.Picture.Icon); + PopupScherm.pnlbtnActie1.VerticalAlignment := taAlignBottom; + end; + if ImageIndex2 >= 0 then begin + PopupScherm.pnlbtnActie2.Top := PopupScherm.pnlbtnActie2.Top - 60; + PopupScherm.pnlbtnActie2.Height := PopupScherm.pnlbtnActie2.Height + 60; + fImagesScherm.ilAlgemeen64.GetIcon(ImageIndex2, PopupScherm.imgActie2.Picture.Icon); + end; + + + result := PopupScherm.ShowModal; end;