掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
Imageのサイズ変更について (ID:2298)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
>最初に実行した50x50以上に表示出来ません。 フッフッフッ(‾〜-‾)、それは TImage のタタリじゃな。 TImageは暗黙にTBitmapを背後霊として抱えておるのじゃ。 TImageの大きさを変えたければ、その背後霊にお供物を供えて お願いせねばならぬ。 お供物としては、メモリ煎餅などが良かろう。 procedure TForm1.FormCreate(Sender: TObject); begin Image1.Width := 50; Image1.Height := 50; Image1.Canvas.Rectangle(0, 0, Image1.Width, Image1.Height); end; procedure TForm1.Button1Click(Sender: TObject); begin with Image1 do begin Picture.Bitmap.Width := Width * 2; Picture.Bitmap.Height := Height * 2; Width := Picture.Bitmap.Width; Height := Picture.Bitmap.Height; Canvas.Brush.Style := bsSolid; Canvas.Brush.Color := clWhite; Canvas.FillRect(rect(0, 0, Width, Height)); Canvas.Brush.Color := clRed; Canvas.Brush.Style := bsDiagCross; Canvas.Ellipse(0, 0, Width, Height); end; end;
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.