Recent

Author Topic: [SOLVED] TImage and it's descendants  (Read 1695 times)

PatBayford

  • Full Member
  • ***
  • Posts: 125
[SOLVED] TImage and it's descendants
« on: February 28, 2018, 03:54:20 am »
Does anybody have a reliable way to determine if a TImage, or any of it's descendants, actually contain graphical content? I've been ploughing through the methods, but can't seem to find anything. (I'm fairly sure I never solved this in Delphi either!!)
« Last Edit: March 03, 2018, 01:23:46 am by PatBayford »
Lazarus 1.8.0 FPC 3.0.2 SVN 56594 Windows 10 64bit (i386-win32-win32/win64)

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: TImage and it's descendants
« Reply #1 on: February 28, 2018, 04:35:48 am »
Code: Pascal  [Select][+][-]
  1. function IsEmpty(aImage:TImage):Boolean;
  2. begin
  3.   Result := aImage.Picture.Graphic = nil;
  4. end;
  5.  
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

PatBayford

  • Full Member
  • ***
  • Posts: 125
Re: TImage and it's descendants
« Reply #2 on: March 01, 2018, 02:05:26 am »
Thanks taazz - will try this later tonight (when I get my programming head on)!  :D
Have now checked this and it seems to work fine - NOT tested exhaustively, but shouldbe good enough for my needs - thanks again taazz
« Last Edit: March 03, 2018, 01:23:11 am by PatBayford »
Lazarus 1.8.0 FPC 3.0.2 SVN 56594 Windows 10 64bit (i386-win32-win32/win64)

 

TinyPortal © 2005-2018