From 948952a30eb0583b59705324ea4c347648ba1950 Mon Sep 17 00:00:00 2001 From: jujibo Date: Tue, 20 Sep 2011 15:27:54 +0000 Subject: [PATCH] Added: Non DB-Aware input controls example git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1978 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../jujibo-utils/examplenodb/main.lfm | 132 ++++++++++++++++++ .../jujibo-utils/examplenodb/main.pas | 42 ++++++ .../jujibo-utils/examplenodb/testnodb.lpi | 74 ++++++++++ .../jujibo-utils/examplenodb/testnodb.lpr | 21 +++ 4 files changed, 269 insertions(+) create mode 100644 components/jujiboutils/jujibo-utils/examplenodb/main.lfm create mode 100644 components/jujiboutils/jujibo-utils/examplenodb/main.pas create mode 100644 components/jujiboutils/jujibo-utils/examplenodb/testnodb.lpi create mode 100644 components/jujiboutils/jujibo-utils/examplenodb/testnodb.lpr diff --git a/components/jujiboutils/jujibo-utils/examplenodb/main.lfm b/components/jujiboutils/jujibo-utils/examplenodb/main.lfm new file mode 100644 index 000000000..398548b86 --- /dev/null +++ b/components/jujiboutils/jujibo-utils/examplenodb/main.lfm @@ -0,0 +1,132 @@ +object Form1: TForm1 + Left = 378 + Height = 295 + Top = 196 + Width = 332 + Caption = 'Example' + ClientHeight = 295 + ClientWidth = 332 + LCLVersion = '0.9.31' + object Label1: TLabel + Left = 8 + Height = 18 + Top = 8 + Width = 253 + Caption = 'Testing non DB-Aware Input Controls' + Font.Height = 14 + Font.Style = [fsBold] + ParentColor = False + ParentFont = False + end + object GroupBox1: TGroupBox + Left = 24 + Height = 82 + Top = 40 + Width = 288 + Caption = 'Labeled controls' + ClientHeight = 63 + ClientWidth = 284 + TabOrder = 0 + object JLabeledIntegerEdit1: TJLabeledIntegerEdit + Left = 14 + Height = 27 + Top = 23 + Width = 80 + DisplayFormat = '0' + Value = 0 + EditLabel.AnchorSideLeft.Control = JLabeledIntegerEdit1 + EditLabel.AnchorSideBottom.Control = JLabeledIntegerEdit1 + EditLabel.Left = 14 + EditLabel.Height = 18 + EditLabel.Top = 2 + EditLabel.Width = 45 + EditLabel.Caption = 'Integer' + EditLabel.ParentColor = False + TabOrder = 0 + end + object JLabeledCurrencyEdit1: TJLabeledCurrencyEdit + Left = 102 + Height = 27 + Top = 23 + Width = 80 + DisplayFormat = '#,0.00 €' + Decimals = 2 + Value = 0 + EditLabel.AnchorSideLeft.Control = JLabeledCurrencyEdit1 + EditLabel.AnchorSideBottom.Control = JLabeledCurrencyEdit1 + EditLabel.Left = 102 + EditLabel.Height = 18 + EditLabel.Top = 2 + EditLabel.Width = 55 + EditLabel.Caption = 'Currency' + EditLabel.ParentColor = False + TabOrder = 1 + end + object JLabeledDateEdit1: TJLabeledDateEdit + Left = 190 + Height = 27 + Top = 22 + Width = 80 + DisplayFormat = 'dd/mm/yy' + Value = 0 + EditLabel.AnchorSideLeft.Control = JLabeledDateEdit1 + EditLabel.AnchorSideBottom.Control = JLabeledDateEdit1 + EditLabel.Left = 190 + EditLabel.Height = 18 + EditLabel.Top = 1 + EditLabel.Width = 29 + EditLabel.Caption = 'Date' + EditLabel.ParentColor = False + TabOrder = 2 + end + end + object GroupBox2: TGroupBox + Left = 24 + Height = 105 + Top = 128 + Width = 288 + Caption = 'Normal Controls' + ClientHeight = 86 + ClientWidth = 284 + TabOrder = 1 + object JIntegerEdit1: TJIntegerEdit + Left = 14 + Height = 27 + Top = 23 + Width = 80 + DisplayFormat = '0º' + Value = 0 + TabOrder = 0 + end + object JCurrencyEdit1: TJCurrencyEdit + Left = 102 + Height = 27 + Top = 23 + Width = 80 + DisplayFormat = '$ #,0.00' + Decimals = 2 + Value = 0 + TabOrder = 1 + end + object JDateEdit1: TJDateEdit + Left = 190 + Height = 27 + Top = 23 + Width = 80 + DisplayFormat = 'dd/mm/yy' + Value = 0 + TabOrder = 2 + end + end + object BitBtn1: TBitBtn + Left = 221 + Height = 30 + Top = 249 + Width = 91 + Anchors = [akRight, akBottom] + Caption = '&Cerrar' + Kind = bkClose + ModalResult = 11 + TabOrder = 2 + end +end diff --git a/components/jujiboutils/jujibo-utils/examplenodb/main.pas b/components/jujiboutils/jujibo-utils/examplenodb/main.pas new file mode 100644 index 000000000..2a290cb03 --- /dev/null +++ b/components/jujiboutils/jujibo-utils/examplenodb/main.pas @@ -0,0 +1,42 @@ +unit main; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, + Buttons, JIntegerEdit, JLabeledIntegerEdit, JCurrencyEdit, + JLabeledCurrencyEdit, JDateEdit, JLabeledDateEdit; + +type + + { TForm1 } + + TForm1 = class(TForm) + BitBtn1: TBitBtn; + GroupBox1: TGroupBox; + GroupBox2: TGroupBox; + JCurrencyEdit1: TJCurrencyEdit; + JDateEdit1: TJDateEdit; + JIntegerEdit1: TJIntegerEdit; + JLabeledCurrencyEdit1: TJLabeledCurrencyEdit; + JLabeledDateEdit1: TJLabeledDateEdit; + JLabeledIntegerEdit1: TJLabeledIntegerEdit; + JLabeledIntegerEdit2: TJLabeledIntegerEdit; + Label1: TLabel; + private + { private declarations } + public + { public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.lfm} + +end. + diff --git a/components/jujiboutils/jujibo-utils/examplenodb/testnodb.lpi b/components/jujiboutils/jujibo-utils/examplenodb/testnodb.lpi new file mode 100644 index 000000000..9b2e36a78 --- /dev/null +++ b/components/jujiboutils/jujibo-utils/examplenodb/testnodb.lpi @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/jujiboutils/jujibo-utils/examplenodb/testnodb.lpr b/components/jujiboutils/jujibo-utils/examplenodb/testnodb.lpr new file mode 100644 index 000000000..c9c2f1cc2 --- /dev/null +++ b/components/jujiboutils/jujibo-utils/examplenodb/testnodb.lpr @@ -0,0 +1,21 @@ +program testnodb; + +{$mode objfpc}{$H+} + +uses + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}clocale, {$ENDIF} + Interfaces, // this includes the LCL widgetset + Forms, main + { you can add units after this }; + +{$R *.res} + +begin + RequireDerivedFormResource := True; + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. +