Why don't we try Ord() function?
[EMAIL PROTECTED] wrote:
Hi John.
FontStyle is a 'set' , but I think you can get it this way:
-------
type
pFontStyles = ^TFontStyles;
pInteger = ^integer;
function FontStylesToInteger(const Value : TFontStyles): integer;
begin
Result := pInteger(@Value)^;
end;
function IntegerToFontStyles(const Value : integer): TFontStyles;
begin
Result := pFontStyles(@Value)^;
end;
------------
Tell me if it works :)
/Chrizz
Message from John Samperi <[EMAIL PROTECTED]> received on
2005-11-15 04:29
2005-11-15 John Samperi <[EMAIL PROTECTED]>
04:29
Please respond to [email protected]
Sent by John Samperi <[EMAIL PROTECTED]>
To: [email protected]
cc: (bcc: Christer T Johansson/SEROP/ABB)
Subject: [lazarus] Synedit error-Bit more
OK so now I have Background colour and Font colour
working using WriteInteger:
myINI.WriteInteger('Editor','Background Colour',SynEdit1.Color);
myINI.WriteInteger('Editor','Font Color',SynEdit1.Font.Color);
Trying to do the same with Font.Style brings up another error
Got TFontStyles expected LongInt
myINI.WriteInteger('Editor','Font Style',SynEdit1.Font.Style);
So it's not an integer and it's not a string..... :-[
Please keep in mind I'm only an OLD beginner :-)
This is how the defaults ares set up if the ini file doesn't exists.
procedure TForm1.SetDefaults;
begin
Display_Address:=$1f; //Set up default display
Clock_Address:=$19; //and clock adress
SynEdit1.Color:=clBlack;
SynEdit1.Font.Name:='Times New Roman';
SynEdit1.Font.Color:=clRed;
SynEdit1.Font.Style:=[]; //'Regular'**************
SynEdit1.Font.Size:=12;
end;
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives