Hi All, Well, it's been over a week since I looked at this and I thought that it was working okay. Now I get Fatal: Can't find unit Graphics used by arraybutton. It is derived from
TArrayButton = class(TGradButton) { class(TButton) }
@name GradButton
@author Eugen Bolz
@lastchange 21.07.2008
I would like advice on whether it is best to use TGradButton or TButton
and how to get rid of these Fatal errors due to not finding the units.
The file is saved here:
/home/pewink/Public/My_code/lazarus/0.9.28.2/pewink/Hexxpawn/ArrayButton/
but for reasons which defy me, whenever I try to open or save any file I
am directed to this folder:
/home/pewink/Public/My_code/lazarus/0.9.28.2/pewink/test1/
I have Multiple lazarus installations on
both /home/pewink/Public/My_code/lazarus/0.9.28.2/lazarus/ (system
default executable) and my own custom lazarus
on /home/pewink/.lazarus/bin/lazarus/
and I think that this is causing all the problems. How do I get back to
a single installation of lazarus and not need to worry about the wrong
permissions for files??? Both lazarus installations are the SAME
version, so I only need one not two!!!
unit arraybutton;
//{$MODE Delphi}
{$mode objfpc}{$H+}
{ ------------------------------------------------------------
Author: Unknown +
------ modifications by Peter E. Williams +
suggestions from alt.comp.lang.borland-delphi newsgroup +
suggestions from Mark Meyer in
[email protected].
This code is freeware and is placed into the Public Domain by Peter E.
Williams
( [email protected] ).
Version 0.1a - for Lazarus by PEW
Date: 17 June 2010
Added :--------
FRowCount, FColCount: integer;
procedure SetRowCount(r: integer);
procedure SetColCount(c: integer);
Version: 0.04a - by PEW. 'col' changed to 'column'. Setcol changed to
setcolumn.
Previous versions:
-----------------
Versions: 0.03a to 0.03f - trial versions to declare component based
on tcustomcontrol instead of on tbutton. Unsuccessful.
Version: 0.02b - mods by Mark Meyer + PEW.
Version: 0.02 - Dated: 15 February 2001
Version: 0.01 - Dated: 14 April 2000
Modified to form new unit based on AColorBtn & arraybtn,
based entirely on Acolorbtn with Row & Column properties of arraybtn
added.
Note: The only difference between this component and AColorBtn is
* essentially that this component has additional 'row' & 'Column'
published
properties.
Thanks and Acknowledgements:
---------------------------
Thanks to the unknown person who originally sent me version 0.01 of
this code,
and to Bruce Roberts ([email protected]) who posted up v0.02
modifications
to the ng. Thanks also to all those in the
alt.comp.lang.borland-delphi newsgroup
for their discussion of it and support.
Last modified by: Peter E. Williams
Known bugs:
----------
(#1 is now fixed!!!)
#1 - Captions containing #13 characters are displayed as
as single line of text.
#2 - There is no visual difference between Enabled true or false.
The
Enabled property works otherwise as normal. Workaround is to
use
the Font.Style settings to show when a button is Enabled, e.g.
for Enabled = true set to [fsbold], false set to [fsitalic]
(this
is NOT done automatically).
#3 - Color property is assigned an invalid value of clCream.
Reported by "Mark Meyer" <gee...@g...>
(via [email protected])
Available from:
??????????????
http://www.angelfire.com/biz6/pwillcomputing/peter_delphi_page.html
as filename:
arraycolorbtn_src.zip
------------------------------------------------------------
}
interface
uses
{Windows,}{ Messages,} SysUtils, Classes, Graphics, Controls, Forms,
Dialogs,
../Hexxpawn/ArrayButton/arraybutton.pas(1,1) Fatal: Can't find unit
Graphics used by arraybutton
this error is actually on line 78, column 45 !!!
{StdCtrls,}
LcLType, lresources,
ugradbtn;
type
TOnArrowKeyEvent = procedure( Sender: TObject;
Key: Word;
Row: integer;
Column: integer;
RowCount : integer; // new
ColCount : integer; // new
var handled: boolean) of object;
TArrayButton = class(TGradButton) { class(TButton) }
private
IsFocused: Boolean;
FCanvas: TCanvas;
FRow,FColumn, FRowCount, FColCount: integer;
FUseDefaultKeyHandler : boolean;
FOnArrowKey : TOnArrowKeyEvent;
procedure SetRow(r: integer);
procedure SetColumn(c: integer);
procedure SetRowCount(r: integer);
procedure SetColCount(c: integer);
{
procedure CNDrawItem(var Msg: MDrawItemStruct); message CN_DRAWITEM;
//procedure CNDrawItem(var Msg: TWMDrawItem); message CN_DRAWITEM;
procedure CMFontChanged(var Msg: TMessage); message CM_FONTCHANGED;
procedure CMEnabledChanged(var Msg: TMessage); message
CM_ENABLEDCHANGED;
procedure WMLButtonDblClk(var Message: TWMLButtonDblClk);
message WM_LBUTTONDBLCLK;
}
protected
// procedure CreateParams(var Params: TCreateParams); override;
// procedure CreateWnd; override;
// procedure SetButtonStyle(ADefault: Boolean); override;
procedure DoArrowKey(key : word);
public
// procedure SetBounds (ALeft, ATop, AWidth, AHeight: Integer);
override;
constructor Create (AOwner: TComponent); override;
destructor Destroy; override;
procedure KeyPress(var Key: Char); override;
procedure KeyUp(var Key: Word; Shift: TShiftState); override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
published
property UseDefaultKeyHandler: boolean read FUseDefaultKeyHandler
write FUseDefaultKeyHandler;
property OnArrowKey : TOnArrowKeyEvent read FOnArrowKey write
FOnArrowKey;
property Row: integer read FRow write SetRow default 1;
property Column: integer read FColumn write SetColumn default 1;
property RowCount: integer read FRowCount write SetRowCount default
1;
property ColCount: integer read FColCount write SetColCount default
1;
property Color;
property Width default 75;
property Height default 25;
property ParentShowHint;
property ShowHint;
property TabOrder;
property TabStop;
property Visible;
property OnEnter;
property OnExit;
end;
procedure Register;
//--------------------
Unit ugradbtn.pas
{
@name GradButton
@author Eugen Bolz
@lastchange 21.07.2008
@version 1.4
@thx to http://www.delphipraxis.net/topic67805_farbverlauf
+berechnen.html
@license http://creativecommons.org/licenses/LGPL/2.1/
@wiki http://wiki.lazarus.freepascal.org/TGradButton
}
unit ugradbtn;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Controls, graphics, LCLType, LResources,
LCLIntf , Buttons, urotatebitmap, types;
--
Proudly developing Quality Cross Platform Open Source Games
Since 1970 with a Commodore PET 4016 with 16 KRAM
http://pews-freeware-games.org (<--- brand new)
<<attachment: Screenshot-Multiple lazarus found.png>>
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
