SynEdit1.Font.Size:=(myINI.ReadInteger('Editor','Font
Size',SynEdit1.Font.Size));

     Last param should be the default value, if there are no value:

     SynEdit1.Font.Size:= myINI.ReadInteger('Editor','Font
Size',12);


Message from John Samperi <[EMAIL PROTECTED]> received on
2005-11-14 09:00
                                                                                
                                               
                                                                                
                                               
                2005-11-14        John Samperi <[EMAIL PROTECTED]>              
                                     
                  09:00                                                         
                                               
                                  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                
                                             
                                                                                
                                             




I'm having some problems saving some of Synedit attributes to
a .ini file

Example:

Background color of screen set to black as following
during init:

      SynEdit1.Color:=clBlack;

No error is generated at this point.

When I try and use it in the .ini save/read procedures
as follows:

     myINI.WriteString('Editor','Background Colour',SynEdit1.Color);

I get an error. Got "TGraphicsColor" expected "AnsiString"

Other bits work like:

      SynEdit1.Font.Size:=12;

then writing it to the file

  myINI.WriteInteger('Editor','Font Size',SynEdit1.Font.Size);

or reading it from the file

     SynEdit1.Font.Size:=(myINI.ReadInteger('Editor','Font
Size',SynEdit1.Font.Size));

Hints :-)

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: [EMAIL PROTECTED]
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************


_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
    archives at http://www.lazarus.freepascal.org/mailarchives




_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to