Logo New book: Delphi 2007 Handbook
My blog in online
Delphi tech support service: support.marcocantu.com
Google
  Web www.marcocantu.com

Menu for Development

Site Menu
Delphi 2007 Handbook
Mastering Borland Delphi 2005
Essential Pascal
Essential Delphi
Buy Books Online
Code Repository
Newsgroups
White Papers
Tools
Conferences
Training
Delphi Links
Contact Marco

My Other Sites
Italian Site (www.marcocantu.it)
Developers Newsgroups Browser (dev.newswhat.com)
My town (www.piazzacavalli.net)
the delphi search
Wintech Italia (my company)

Breaking News
Buy Mastering Borland Delphi 2005 from Amazon
Free ebook: Mastering Delphi Update for Delphi 2006

Advertising
Home My Blog Books My Bookstore Development Links Marco


Home: Code Repository: Mastering Delphi 6

Chapter 06 - Project QLibComp

Project Structure

QLibComp.dpr
program QLibComp;

uses
  QForms,
  QLibCompForm in 'QLibCompForm.pas' {Form1};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.
QLibCompForm.pas
unit QLibCompForm;

interface

uses
  SysUtils, Types, Classes, QGraphics, QControls, QForms, QDialogs,
  QStdCtrls;

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

var
  Form1: TForm1;

implementation

{$R *.xfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  ListBox1.Items.add (Edit1.Text);
end;

end.
QLibCompForm.xfm
object Form1: TForm1
  Left = 192
  Top = 107
  Width = 350
  Height = 210
  VertScrollBar.Range = 161
  HorzScrollBar.Range = 297
  ActiveControl = Button1
  Caption = 'QLibComp'
  Color = clBackground
  PixelsPerInch = 96
  TextHeight = 13
  TextWidth = 6
  object Button1: TButton
    Left = 56
    Top = 64
    Width = 75
    Height = 25
    Caption = 'Add'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Edit1: TEdit
    Left = 40
    Top = 32
    Width = 105
    Height = 21
    TabOrder = 1
    Text = 'my name'
  end
  object ListBox1: TListBox
    Left = 176
    Top = 32
    Width = 121
    Height = 129
    Items.Strings = (
      'marco'
      'john'
      'helen')
    Rows = 3
    TabOrder = 2
  end
end