LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Block Diagram Key Focus ...for free label decoration

[Cross-posted to LAVA]

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

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 1 of 6
(6,064 Views)

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?

Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 2 of 6
(4,696 Views)

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.

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 3 of 6
(4,696 Views)

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.

0 Kudos
Message 4 of 6
(4,696 Views)

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??

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 5 of 6
(4,696 Views)

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

0 Kudos
Message 6 of 6
(4,560 Views)