[lazarus] What to do
Shane Miller
smiller at lakefield.net
Sat Jul 17 23:07:00 EDT 1999
Stefan Hille added a TGroupBox to Lazarus. It seems that it doesn't display
correctly while the canvas is added to the form, but I'm sure that's somehow
related to the problems that I am having with it.
Thanks Stefan.
For those that would like to add something: Here are basic instructions
(basic=bad)
Determine what component to add. Stefan chose TGroupBox. Add a constant to
gtkint.pp and vclglobals.pp for the component style. In this case,
csGroupBox = 29 was added.
Go into the gtkint.pp CreateComponent and write the code to create the gtk
widget.
Design the class in a .pp file (In this case he used stdcontrols.pp). Look
at Delphi if you want to get an idea on where they thought a widget of that
type should be.
In the classes Create, call the inherited Create, set fCompStyle :=
csGroupBox, then call CreateComponent in TControls which will call
gtkint.pp. Then call AddControl which will call TControl and will add the
control to it's OWNER.
Any events specific to that control, and NOT handled by a lower class
(TControl, TWinControl, etc) should be added in that class.
Simply do it like this:
For TCustomEdit, it needs to know when it changes so we create code to
handle that.
TCustomEdit = class....
private
..
FOnChange : TNotifyEvent;
...
protected
Procedure DoChanged(var msg); message LM_Changed;
...
public
...
property OnChange: TNotifyEvent read FOnChange write FOnChange;
..
end
DoChanged get's called when the edit control changes. This is done
automatically. The gtk widget gtkeditable is used for the edit box. It has
a signal (event) called 'changed' so in gtkint.pp we go to the setcallback
procedure and make sure that it has an entry for the event 'changed' by
adding LM_Change (a const found in LMessages.pp).
That's really the majority of it. The rest is just like adding a class in
Delphi. Write a bunch of code and pray it works.
Any questions? :-)
Shane
-----Original Message-----
From: Shane Miller <smiller at lakefield.net>
To: lazarus at miraclec.com <lazarus at miraclec.com>
Date: Saturday, July 17, 1999 7:27 PM
Subject: Re: [lazarus] What to do
>
>>*TApplication
>>TAutoIncField
>>TBatchMove
>>TBCDField
>>*TBevel
>>*TBitBtn
>>*TBitmap
>>TBlobField
>>TBlobStream
>>TBooleanField
>>*TBrush
>>*TButton
>
>Basic code completed. Needs finalization.
>
>
>>TBytesField
>>*TCanvas
>
>Basic code completed. Needs alot of work yet.
>
>
>>TChangeLink
>>*TCheckBox
>>TClipboard
>>TCollection
>>TCollectionItem
>>TColorDialog
>>TColumn
>>TColumnTitle
>>*TComboBox
>Basic code completed. Needs finalization.
>
>>TControlScrollBar
>>TCurrencyField
>>TDatabase
>>TDataSource
>>TDateField
>>TDateTimeField
>>TDBCheckBox
>>TDBComboBox
>>TDBCtrlGrid
>>TDBEdit
>>TDBGrid
>>TDBImage
>>TDBListBox
>>TDBLookupCombo
>>TDBLookupComboBox
>>TDBLookupList
>>TDBLookupListBox
>>TDBMemo
>>TDBNavigator
>>TDBRadioGroup
>>TDBText
>>TDDEClientConv
>>TDDEClientItem
>>TDDEServerConv
>>TDDEServerItem
>>TDirectoryListBox
>>TDragControlObject
>>TDragObject
>>TDrawGrid
>>TDriveComboBox
>>*TEdit
>Basic code completed. Needs finalization.
>
>
>>TField
>>TFieldDef
>>TFieldDefs
>>TFileListBox
>>TFilterComboBox
>>TFindDialog
>>TFloatField
>>*TFont
>Basic code completed. Needs finalization.
>
>>TFontDialog
>>*TForm
>Pretty well coded. Needs finalization.
>
>>TGraphic
>>TGraphicField
>>TGraphicsObject
>>*TGroupBox
>>THeader
>>THeaderControl
>>THeaderSection
>>THeaderSections
>>THotKey
>>*TIcon
>>TIconOptions
>>TImage
>>TImageList
>>TIndexDef
>>TIndexDefs
>>TIniFile
>>TIntegerField
>>*TLabel
>Pretty much complete. Needs some finalization.
>
>>*TList
>>TListBox
>Basic code completed. VERY basic. Needs a lot of work.
>
>
>>TListColumn
>
>>TListItem
>Basic code completed. VERY basic. Needs a lot of work.
>
>>TListItems
>Basic code completed. VERY basic. Needs a lot of work.
>
>>TListView
>Basic code completed. VERY basic. Needs a lot of work.
>
>>TMainMenu
>Basic code completed. Needs some work.
>
>>TMaskEdit
>>TMediaPlayer
>>*TMemo
>
>Pretty well coded. Still needs some involved work though. Responds to a
>few events.
>
>>TMemoField
>>*TMenuItem
>Basic code completed.
>
>>TMetafile
>>TMetafileCanvas
>Basic code completed. VERY basic. Needs a lot of work.
>
>>TNotebook
>
>>TOleContainer
>>TOpenDialog
>
>Basic code completed.
>
>>TOutline
>>TOutlineNode
>>TPageControl
>>TPaintBox
>>*TPanel
>>TParaAttributes
>>TParam
>>TParams
>>*TPen
>>TPicture
>>TPopupMenu
>>TPrintDialog
>>TPrinter
>>TPrinterSetupDialog
>>TProgressBar
>>TQuery
>>*TRadioButton
>Basic code completed. VERY basic. Needs a lot of work. Still has GTK
>specific code in it.
>
>>TRadioGroup
>>TRegIniFile
>>TRegistry
>>TReplaceDialog
>>TReport
>>TRichEdit
>>TSaveDialog
>>*TScreen
>>*TScrollBar
>Basic code completed. VERY basic. Needs a lot of work.
>
>>TScrollBox
>>TSession
>>TShape
>>TSmallIntField
>>TSpeedButton
>>TStatusBar
>Basic code completed. You can set the SImpleText property, but not much
>else.
>
>>TStatusPanel
>>TStatusPanels
>>TStoredProc
>>TStringField
>>TStringGrid
>>TStringList
>>TStrings
>>TStringGrid
>>TTabbedNotebook
>>TTabControl
>>TTable
>>TTabSet
>>TTabSheet
>>TTextAttributesg
>>TThread
>>TTimeField
>>TTimer
>>TTrackBar
>>TTreeNode
>>TTreeNodes
>>TTreeView
>>TUpdateSQL
>>TUpDown
>>TVarBytesField
>>TWordField
>
>
>That what I'm aware of. We also have a TCheckBox I think along with a
>Spinbutton control....
>
>Shane
>
>
>_________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.miraclec.com/list_archives/lazarus
>
More information about the Lazarus
mailing list