12-20-2009 07:19 PM
Howdy scripting ninjas!
Does anyone know of a scripting method to give focus to a free label decoration on the block diagram?
I just want to programmatically have the cursor appear at the end of some text in a free label.
We have the Key Focus property for a control, but is there something similar on the BD for text class object?
Cheers
-JG
12-21-2009 11:06 AM
I believe the closest you can get is the "Selection" property. Perhaps you could grab Text.Text, display a dialog with this, edit it, and then write back to the Text property?
12-21-2009 07:51 PM
Thanks for the suggestion.
But I essentially just wanted to Quick Drop in the Label and have it return to where I was typing.
I want it to keep focus so my flow is not disturbed.
Otherwise it is going to be quicker to do want I want manually.
12-22-2009 09:34 AM
jg-code wrote:
Thanks for the suggestion.
But I essentially just wanted to Quick Drop in the Label and have it return to where I was typing.
I want it to keep focus so my flow is not disturbed.
Otherwise it is going to be quicker to do want I want manually.
What does it mean "to Quick Drop in the Label and have it return to where I was typing."
Describe the flow or take a jing screencast of what your talking about doing manually.
12-22-2009 07:50 PM
Hi Norm
All I am trying to do is create a shortcut for Size To Text property for a Free Label.
Just the same as when are typing into a String Constant and you can press Shift + Enter and it sets Size to Text = FALSE and jumps to a new line without adding a line feed constant (<LF>)
I thought Quick Drop (QD) would not disturb the flow of typing as currently I have to start and stop to do it.
Workflow:-
Typing text in Free Label reach certain width you do not want to exceed
Hit QD shortcut
Free Label text jumps to new line without adding a <LF>
Focus is returned to the new line
Continue typing etc..
Hope that makes sense.
Don't know if it's possible??
02-20-2017 04:01 AM
Dredging up the past somewhat - did you ever get anywhere with this?
I have a similar use case, I create a new free label via scripting within a quickdrop pluging, and I then want to start typing right away within the label. I tried the "selection" property, but that didnt seem to help...
Cheers
Paul