TListbox Items are not working

Issue #21 resolved
Former user created an issue

The following project is not working as expected.

program Project2;

uses System.StartUpCopy, FMX.Forms, Unit3 in 'Unit3.pas' {Form3};

{$R *.res}

begin Application.Initialize; Application.CreateForm(TForm3, Form3); Application.Run; end.

object Form3: TForm3 Left = 0 Top = 0 Caption = 'Form3' ClientHeight = 369 ClientWidth = 640 FormFactor.Width = 320 FormFactor.Height = 480 FormFactor.Devices = [Desktop] OnCreate = FormCreate DesignerMasterStyle = 0 object Button1: TButton Position.X = 32.000000000000000000 Position.Y = 24.000000000000000000 Size.Width = 569.000000000000000000 Size.Height = 65.000000000000000000 Size.PlatformDefault = False TabOrder = 0 Text = 'Button1' OnClick = Button1Click end object Edit1: TEdit Touch.InteractiveGestures = [LongTap, DoubleTap] TabOrder = 1 Position.X = 32.000000000000000000 Position.Y = 104.000000000000000000 Size.Width = 569.000000000000000000 Size.Height = 22.000000000000000000 Size.PlatformDefault = False OnDblClick = Button1Click end object ListBox1: TListBox Position.X = 32.000000000000000000 Position.Y = 136.000000000000000000 Size.Width = 569.000000000000000000 Size.Height = 200.000000000000000000 Size.PlatformDefault = False TabOrder = 2 DisableFocusEffect = True DefaultItemStyles.ItemStyle = '' DefaultItemStyles.GroupHeaderStyle = '' DefaultItemStyles.GroupFooterStyle = '' Viewport.Width = 565.000000000000000000 Viewport.Height = 196.000000000000000000 end end

unit Unit3;

interface

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

type TForm3 = class(TForm) Button1: TButton; Edit1: TEdit; ListBox1: TListBox; procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private-Deklarationen } public { Public-Deklarationen } end;

var Form3: TForm3;

implementation

{$R *.fmx}

procedure TForm3.Button1Click(Sender: TObject); begin ListBox1.Items.Add(Edit1.Text); end;

procedure TForm3.FormCreate(Sender: TObject); begin ListBox1.Items.Add('test1'); ListBox1.Items.Add('test2'); ListBox1.Items.Add('test3'); end;

end.

Comments (6)

  1. Paul Richardson

    I've just replicated this issue using Tokyo 10.2 and latest 0.904 demo release (I've only ever installed this release). Using two different FMX apps, one a pre-tokyo app updated to include linux and also a brand new app with details from above. The Listbox isn't displaying any items on linux but works fine when I switch to windows 64.
    Note the Fmuxlib.dll shows a version of 1.0.0.0. and I'm using Ubuntu Linux V 16.10 in VMWare Thanks.

  2. Kaspar Neuenschwander

    It works ok, but in Linux you get the following message from the PAServer:

    Gtk-CRITICAL **: gtk_check_menu_item_set_active: assertion 'GTK_IS_CHECK_MENU_ITEM (check_menu_item)' failed

    I am now using the officially released Version 1.0

  3. Log in to comment