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
 Update font on Memo
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

cgsi

Canada
8 Posts

Posted - Sep 03 2014 :  13:02:43  Show Profile  Reply
Hello,

I have a problem since upgrading from 3.1.1 to 5.1.1.

Before, when I modified a Memo annotation, I would select it and change Font (size, name, etc.) with the following method:

ImageEnVect1.ObjFontHeight[idx] := NewSize;

Now it doesn't work, it seems that I can't change the font with this method anymore, is that possible? Is there another way?

Thank you.

Jeremy

xequte

38198 Posts

Posted - Sep 03 2014 :  17:13:12  Show Profile  Reply
Hi Jeremy

I cannot reproduce this in v5.1.2 beta, are you sure idx is valid?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

cgsi

Canada
8 Posts

Posted - Sep 04 2014 :  04:36:33  Show Profile  Reply
Yes, I create one object and idx = 0.

Can you reproduce with 5.1.1?

Jeremy

Jeremy
Go to Top of Page

xequte

38198 Posts

Posted - Sep 04 2014 :  12:26:55  Show Profile  Reply
Hi Jeremy

Please check the documentation. The index of objects properties, such as ObjFontHeight, is not an index it is an hObj ID.

Either convert the index to an obj using:

http://www.imageen.com/help/TImageEnVect.GetObjFromIndex.html

or use one of the shortcuts such as IEV_PREVIOUS_INSERTED_OBJECT:

ImageEnVect1.ObjFontHeight[IEV_PREVIOUS_INSERTED_OBJECT] := NewSize;

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

cgsi

Canada
8 Posts

Posted - Sep 05 2014 :  04:14:08  Show Profile  Reply
Hi Nigel,

I have tried both with the correct index and IEV_PREVIOUS_INSERTED_OBJECT, I still have the same problem. I have uninstalled and reinstalled ImageEN and still get the same results.

I already had a project working fine but now it doesn't work anymore. I need to be able to modify font properties of various Memo annotations and not just the last inserted or the next one to insert.

Here is the code for a demo project I started:


procedure TForm1.FormCreate(Sender: TObject);
begin
   ImageEnVect1.ObjPenColor[-1] := clBlack;
   ImageEnVect1.ObjBrushColor[-1] := clWhite;
end;

procedure TForm1.ComboBox1Change(Sender: TObject);
var
   i, hobj:integer;
begin
   for i := 0 to ImageEnVect1.ObjectsCount do
   begin
   	hobj := ImageEnVect1.GetObjFromIndex( i );
   	ImageEnVect1.ObjFontHeight[hobj] := StrToInt(combobox1.Text);
   end;
end;

procedure TForm1.btnTextClick(Sender: TObject);
begin
	ImageEnVect1.MouseInteractVt := [miPutMemo];
end;

procedure TForm1.ImageEnVect1NewObject(Sender: TObject; hobj: Integer);
begin
	ImageEnVect1.MouseInteractVt := [miObjectSelect];
end;


Jeremy
Go to Top of Page

xequte

38198 Posts

Posted - Sep 05 2014 :  17:14:39  Show Profile  Reply
Hi Jeremy

I cannot reproduce that. Perhaps you are encountering an issue in v5.1.1. Please email me for the v5.1.2 beta.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

cgsi

Canada
8 Posts

Posted - Sep 16 2014 :  05:49:34  Show Profile  Reply
It seems it was a problem with 5.1.1 in my case didn't work at all.
When I tried version 5.1.0 now it works fine.

Thanks

Jeremy
Go to Top of Page

xequte

38198 Posts

Posted - Sep 16 2014 :  21:59:49  Show Profile  Reply
Hi

V5.1.1 had an issue with TImageEnVect, which v5.1.2 should have fixed.

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