I've added the following lines:

//================ snip =========================
 Image1.Canvas.Width:=Form1.Width;
Image1.Canvas.Height:=Form1.Height; //================ snip =========================

Which produces the following Error Dialog:
"Project raised exception class 'External SIGFPE'."

Debugger halts at Unit 'LCLProc' , line 786
//================ snip =========================
 if (length(Msg) div (length(Msg) div 10000))=0 then ;
//================ snip =========================

I notice in the bug report that the Severity is listed as 'minor', but surely TImage is unusable if it can't be resized? Well, I suppose you could still use it with non-resizable forms, but that would certainly diminish it's usefulness.

Many Thanks,

Dave Coventry


Vincent Snijders wrote:
Dave Coventry schreef:
Hi,

I have a TImage, Image1 on my form.

I have the following code:
//================ snip =========================
procedure TForm1.FormResize(Sender: TObject);
begin
 Image1.Width:=Form1.Width;
 Image1.Height:=Form1.Height-98;
 Image1.Canvas.Brush.Color:=clBlack;
 Image1.Canvas.FillRect(0,0,Image1.Width,Image1.Height);
 showmessage('Image width:'+inttostr(Image1.Width));  end;
//================ snip =========================

The Image1.Width does change size, but the area painted black remains at the Width specified at design time.

Can anyone help?


I cannot help, but this sounds familiar:
http://www.freepascal.org/mantis/view.php?id=7192

Vincent

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




--
Dave Coventry
Tel:  +27(0)31 3092301
Fax:  +27(0)31 3092301
Cell: +27(0)82 3685983

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

Reply via email to