Welcome to Pintexx Forum Sign in | Join | Faq

pinEdit WP

Started by DavidP at 03-14-2008 1:00 . Topic has 8 replies.

Print Search
Sort Posts:    
   03-14-2008, 1:00
DavidP is not online. Last active: 14.03.2008 08:33:19 DavidP

Top 50 Posts
Joined on 09-10-2007
Posts 17
Manually execute "backspace" or "delete" call?
Reply Quote
Is there a way to, from code, simulate "backspace" or "delete" key presses by calling a function or something?

I'm using the ActiveX component of the pinEditor.

   Report 
   03-14-2008, 2:27
Pintexx Support is not online. Last active: 30.12.2008 07:11:54 Pintexx Support

Top 10 Posts
Joined on 08-30-2005
Posts 1.571
Re: Manually execute "backspace" or "delete" call?
Reply Quote
No, I'm sorry.
   Report 
   03-18-2008, 5:10
DavidP is not online. Last active: 14.03.2008 08:33:19 DavidP

Top 50 Posts
Joined on 09-10-2007
Posts 17
Re: Manually execute "backspace" or "delete" call?
Reply Quote
So there is no way to, in code, remove the previous or next character? Okay.

Then i wonder, is there a way to capture the backspace and delete key presses to do a custom action?

   Report 
   03-19-2008, 9:37
Pintexx Support is not online. Last active: 30.12.2008 07:11:54 Pintexx Support

Top 10 Posts
Joined on 08-30-2005
Posts 1.571
Re: Manually execute "backspace" or "delete" call?
Reply Quote
Hi,

please try editor_keydown event.

Regards,
Hans-Peter
   Report 
   03-31-2008, 1:14
DavidP is not online. Last active: 14.03.2008 08:33:19 DavidP

Top 50 Posts
Joined on 09-10-2007
Posts 17
Re: Manually execute "backspace" or "delete" call?
Reply Quote
Hi.

I'm sorry but the EditorKeyDown event doesn't send the KeyCode for backspace key presses. It's said to be a control key but there's no way to verify if the key pressed was backspace or not. Can i somehow alter the code to allow this?

   Report 
   03-31-2008, 1:54
DavidP is not online. Last active: 14.03.2008 08:33:19 DavidP

Top 50 Posts
Joined on 09-10-2007
Posts 17
Re: Manually execute "backspace" or "delete" call?
Reply Quote
And is it possible to cancel keypresses somehow?

I'm trying to create a workaround which will remove a selected object (i.e. an object selected for resizing). Maybe there's an easy way to do this?

   Report 
   03-31-2008, 5:22
Pintexx Support is not online. Last active: 30.12.2008 07:11:54 Pintexx Support

Top 10 Posts
Joined on 08-30-2005
Posts 1.571
Re: Manually execute "backspace" or "delete" call?
Reply Quote
Hi,

no it's not possible to cancel key press.

Please try this:

editor.execute("editGetActiveObject().removeNode(true)")

Regards,
Hans-Peter


   Report 
   03-31-2008, 5:30
DavidP is not online. Last active: 14.03.2008 08:33:19 DavidP

Top 50 Posts
Joined on 09-10-2007
Posts 17
Re: Manually execute "backspace" or "delete" call?
Reply Quote
Sure, thanks, but i've already tried it and it works fine. However, i only want to remove the selected object if there's an object selected, and only otherwise i want to do a regular backspace/delete. Can that solution be expanded to solve this?

   Report 
   04-01-2008, 8:32
Pintexx Support is not online. Last active: 30.12.2008 07:11:54 Pintexx Support

Top 10 Posts
Joined on 08-30-2005
Posts 1.571
Re: Manually execute "backspace" or "delete" call?
Reply Quote
Hi,

you can find out if there is a selection by using

editor.document.createRange()

You have to add mshtml.dll as reference.
Then you have full access to all objects.

But you can no initiate a backspace/delete this way.
You can only remove something if you select it by using Range object and then clear range.

Regards,
Hans-Peter
   Report 
Pintexx Forum » Developer Produ... » pinEdit WP » Re: Manually execute "backspace" or "delete" call?