Einzelnen Beitrag anzeigen

borstenei

Registriert seit: 11. Nov 2011
121 Beiträge
 
#22

AW: Mobile: Wie können dem ImageViewer1 verschiedene .jpgs zugewiesen werden?

  Alt 2. Nov 2015, 16:52
Ich habe das mal eben bei mir nachgestellt:
Delphi-Quellcode:
unit Unit1;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects,
  FMX.Controls.Presentation, FMX.StdCtrls, FMX.ListBox, FMX.Layouts,
  FMX.TabControl;

type
  TForm1 = class(TForm)
    TabControl1: TTabControl;
    TabItem1: TTabItem;
    TabItem2: TTabItem;
    ListBox1: TListBox;
    ListBoxItem1: TListBoxItem;
    ListBoxItem2: TListBoxItem;
    Button1: TButton;
    Image1: TImage;
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.Button1Click(Sender: TObject);
begin
   Image1.Bitmap.LoadFromFile('C:\Users\Frank\test\' + ListBox1.Selected.Text);
   TabControl1.TabIndex := 1;
end;

end.

das funzt bei mir auf Anhieb...warum auch nicht?!
  Mit Zitat antworten Zitat