Recent

Author Topic: Trying something gui here. need help  (Read 3967 times)

captian jaster

  • Guest
Trying something gui here. need help
« on: May 06, 2010, 03:33:42 pm »
Code: [Select]
unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  StdCtrls, ExtCtrls, ActnList;

type

  { TForm1 }

  TForm1 = class(TForm)
    AddNumber: TEdit;
    ListBox1: TListBox;
    RtrnNumber: TButton;
    TLInfo: TLabel;
    procedure RtrnNumberClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{ TForm1 }

procedure TForm1.RtrnNumberClick(Sender: TObject);
begin

end;

initialization
  {$I Unit1.lrs}

end. 

im trying to get it that when i click ok whatever was typed into Add Number goes into the listbox. or do i need to use something else

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Trying something gui here. need help
« Reply #1 on: May 06, 2010, 03:52:53 pm »
What's the Problem?

Code: [Select]
ListBox1.Items.Add(AddNumber.text);   

captian jaster

  • Guest
Re: Trying something gui here. need help
« Reply #2 on: May 06, 2010, 04:02:37 pm »
Never mind. i did it with a memo box. ill try your code now.
SO COOL!

captian jaster

  • Guest
Re: Trying something gui here. need help
« Reply #3 on: May 06, 2010, 04:07:54 pm »
It works! thnx

 

TinyPortal © 2005-2018