1
0
Files
applications
bindings
components
acs
beepfp
chelper
cmdline
colorpalette
csvdocument
epiktimer
fpsound
fpspreadsheet
freetypepascal
geckoport
gradcontrols
iphonelazext
jujiboutils
jvcllaz
kcontrols
lazbarcodes
manualdock
mplayer
multithreadprocs
nvidia-widgets
onguard
orpheus
powerpdf
rgbgraphics
richmemo
richview
rtfview
rx
Demos
AutoSort
AutoSortDemo.ico
AutoSortDemo.lpi
AutoSortDemo.lpr
AutoSortDemo.manifest
AutoSortDemo.rc
asdmainunit.lfm
asdmainunit.lrs
asdmainunit.pas
FolderLister
PhoneBookDemo
RxDBColorBox
RxDBGrid
RxDateEdit
RxHistoryNavigator
RxLookup
RxViewsPanel
Text90
ToolPanel
docs
images
languages
lib
WinXP.manifest
WindowsXP.RES
WindowsXP.rc
autopanel.pas
boxprocs.pas
curredit.pas
dateutil.pas
dbcurredit.pas
dbdateedit.pas
dbutils.pas
dcl_rx_ctrl.lpk
dcl_rx_ctrl.pas
duallist.pas
exsortfb.pas
exsortmds.pas
exsortsql.pas
exsortzeos.pas
fduallst.lfm
fduallst.lrs
fduallst.lrt
fduallst.pas
folderlister.pas
pagemngr.pas
pickdate.lrs
pickdate.pas
register_rxctrl.pas
registerrx.pas
registerrxdb.pas
registerrxtools.pas
rx.inc
rx.lrs
rxaboutdialog.pas
rxaboutformunit.lfm
rxaboutformunit.pas
rxappicon.pas
rxapputils.pas
rxceeditlookupfields.pas
rxclock.pas
rxcloseformvalidator.pas
rxconfigvalues.pas
rxconst.pas
rxctrls.pas
rxcustomchartpanel.pas
rxdbcolorbox.pas
rxdbcomb.pas
rxdbctrls.pas
rxdbgrid.lrs
rxdbgrid.pas
rxdbgrid_columsunit.lfm
rxdbgrid_columsunit.lrt
rxdbgrid_columsunit.pas
rxdbgrid_findunit.lfm
rxdbgrid_findunit.pas
rxdbspinedit.pas
rxdbtimeedit.pas
rxdconst.pas
rxdice.inc
rxdice.pas
rxfileutils.pas
rxfilterby.lfm
rxfilterby.lrt
rxfilterby.pas
rxhistory.pas
rxhistorynavigator.pas
rxiconv.pas
rxlogin.lfm
rxlogin.lrs
rxlogin.pas
rxlookup.pas
rxmemds.pas
rxnew.lpk
rxnew.pas
rxpopupunit.pas
rxsortby.lfm
rxsortby.lrt
rxsortby.pas
rxsortmemds.pas
rxspin.lrs
rxspin.pas
rxstrutils.pas
rxswitch.inc
rxswitch.pas
rxsystemservices.pas
rxtbrsetup.lfm
rxtbrsetup.lrt
rxtbrsetup.pas
rxtimeedit.pas
rxtoolbar.pas
rxversinfo.pas
rxviewspanel.pas
rxxpman.pas
seldsfrm.lfm
seldsfrm.lrs
seldsfrm.lrt
seldsfrm.pas
tooledit.lrs
tooledit.pas
vclutils.pas
smnetgradient
spktoolbar
svn
thtmlport
tparadoxdataset
tvplanit
virtualtreeview
virtualtreeview-new
xdev_toolkit
zlibar
examples
lclbindings
wst
lazarus-ccr/components/rx/Demos/AutoSort/asdmainunit.pas

83 lines
2.1 KiB
ObjectPascal
Raw Normal View History

{ Demo application from RXFPC
Copyright (C) 2009 Lagunov Aleksey (alexs75@hotbox.ru)
This source is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This code is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
A copy of the GNU General Public License is available on the World Wide Web
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
}
unit asdMainUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, db, FileUtil, LResources, Forms, Controls, Graphics,
Dialogs, StdCtrls, rxmemds, rxdbgrid;
type
{ TForm1 }
TForm1 = class(TForm)
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
Datasource1: TDatasource;
RxDBGrid1: TRxDBGrid;
RxMemoryData1: TRxMemoryData;
RxMemoryData1DATE_ENTER: TDateField;
RxMemoryData1ID: TLongintField;
RxMemoryData1NAME: TStringField;
procedure CheckBox2Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
RxMemoryData1.Open;
RxMemoryData1.AppendRecord([1, 'Delphi', EncodeDate(1995, 8, 1)]);
RxMemoryData1.AppendRecord([2, 'Turbo Pascal', EncodeDate(1983, 8, 1)]);
RxMemoryData1.AppendRecord([3, 'Free Pascal', EncodeDate(1993, 1, 1)]);
RxMemoryData1.AppendRecord([4, 'Lazarus', Now]);
CheckBox2.Checked:=RxDBGrid1.AutoSort;
CheckBox1.Checked:=RxDBGrid1.TitleButtons;
end;
procedure TForm1.CheckBox2Change(Sender: TObject);
begin
RxDBGrid1.AutoSort:=CheckBox2.Checked;
RxDBGrid1.TitleButtons:=CheckBox1.Checked;
end;
initialization
{$I asdmainunit.lrs}
end.