ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 When selected Layer type is TIETextLayer IsEmpty..
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
725 Posts

Posted - Apr 17 2019 :  07:04:46  Show Profile  Reply
Hello,

When selected Layer type is TIETextLayer type IsEmpty return True.

Why?

How to overcome this problem?

TIA


Yogi Yang

w2m

USA
1990 Posts

Posted - Apr 17 2019 :  09:13:29  Show Profile  Reply
with TIETextLayer(ImageEnView.CurrentLayer) do
 begin
   txt := Text;
   if txt.IsEmpty then
     ShowMessage('Text is empty');
end;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

xequte

38180 Posts

Posted - Apr 18 2019 :  02:55:42  Show Profile  Reply
Hi

That is correct. IsEmpty refers to the currently selected bitmap. Non-image layers do not have a valid bitmap, so return IsEmpty = true.

Use something like:

isEmpty := ( ImageEnView1.LayersCount <= 1 ) and ImageEnView1.IsEmpty;

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: