Einzelnen Beitrag anzeigen

GS1200

Registriert seit: 16. Jul 2006
26 Beiträge
 
#3

AW: XE6 ModalesFenster mrResult bringt Fehler.

  Alt 7. Jun 2014, 12:25
Sorry, hatte ich nicht erwähnt.. für Android.

Ich habe mich am Beispiel von emarcadero gehalten:

Delphi-Quellcode:
 procedure THeaderFooterForm.btnPickClick(Sender: TObject); var
  dlg: TForm1;
begin
  dlg := TForm1.Create(nil);
  // select current value, if available in the list
  dlg.ListBox1.ItemIndex := dlg.ListBox1.Items.IndexOf(edit1.Text);
 
  dlg.ShowModal(procedure(ModalResult: TModalResult)
    begin
      if ModalResult = mrOK then
      // if OK was pressed and an item is selected, pick it
        if dlg.ListBox1.ItemIndex >= 0 then
          edit1.Text := dlg.ListBox1.Items [dlg.ListBox1.ItemIndex];
      dlg.DisposeOf;
    end);
 
end;
Hier der Artikel LINK

Gruß

Axel
  Mit Zitat antworten Zitat