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
 Activate textedit in ImageEnVect using code?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

julle

3 Posts

Posted - Jan 25 2012 :  09:22:43  Show Profile  Reply
Is it possible to activate the text edit in ImageEnVect by code when you add new object?

fab

1310 Posts

Posted - Jan 26 2012 :  00:47:45  Show Profile  Reply
Yes, it is possible. Just set ObjTextEditMode to the handle of the object (Memo or Text) to edit:

ImageEnVect1.ObjKind[-1] := iekTEXT;
ImageEnVect1.ObjTextEditMode := ImageEnVect1.AddNewObject();
Go to Top of Page

julle

3 Posts

Posted - Jan 27 2012 :  03:25:32  Show Profile  Reply
Thanks, that works.

One question more, is it possible to select all text in the text edit by code?
Go to Top of Page

fab

1310 Posts

Posted - Jan 27 2012 :  04:32:57  Show Profile  Reply
Unfortunately this is not possible now. Anyway next minor release will have a new event named OnTextEdit (that is like OnActivateTextEdit with more parameters) that passes the editing visual object, so you can better control it.
For example, in order to select all text whenever a text edit is edited you can write (FROM NEXT MINOR RELEASE!!):

procedure TForm1.ImageEnVect1TextEdit(Sender: TObject; hobj: Integer; VisualObject: TObject);
begin
  if VisualObject is TEdit then
    (VisualObject as TEdit).SelectAll;
end;
Go to Top of Page

julle

3 Posts

Posted - Jan 27 2012 :  05:56:11  Show Profile  Reply
OK, looking forward to the next minor release
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: