From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transparent caption over slider

Solved!
Go to solution

Hi,

 

I would like to be able to use my slider even when a text is on top of it. Right now, I cannot access the slider in the text area. How can I move the slider even when I grab it over the text box? Thanks,

 

Alex

0 Kudos
Message 1 of 6
(3,611 Views)

Do you mean something like this?Slider with text.png

I can slide the slider all I want and Hello stays fixed.  Hello is a Text Decoration, and I've Grouped it with the Slider, so even if I drag the Slider to another spot on the Front Panel, the text comes with it (and remains in the same place).

 

Bob Schor

0 Kudos
Message 2 of 6
(3,598 Views)

Mmh not exactly but my first question was misleading. Here is a clarification:

With the hand tool, I can move the slider as i want outside the text area

Outside text box.jpg

 

Now the problem is, when the slider is covered by the text box, it cannot be grabed. See below:

On text box.jpg

The hand tool does nothing. In the compiled code, I cannot grab it either. I have to grab the top part of the slider, which is outside the text box, to be able to move it.

So how I can make sure the text box does not interfere with the controllability of the slider? Thanks!

0 Kudos
Message 3 of 6
(3,570 Views)
Solution
Accepted by topic author shinagan2

Two ways to skin this cat:

1) Customize the slider control, place a free label in the trough.  Move the slider so it overlaps the free label (label is on top).  Select the label and move it backwards until the slider is on top of the free label.  Now the z-order is set, in this case the slider will move over the text which I think looks ok.

2) Show the caption and put it in the position you want over the slider.  Add an event structure.  Add a Mouse Down? (notice the ?) event, in this case hide the caption.  Add a Mouse Down event and in this case show the caption again.  When you run the VI all clicks will grab the slider.

 

 

Message 4 of 6
(3,562 Views)

 

Thanks a lot! That completely answered my question.

0 Kudos
Message 5 of 6
(3,541 Views)

@shinagan2 wrote:

Mmh not exactly but my first question was misleading. Here is a clarification:

With the hand tool, I can move the slider as i want outside the text area

Outside text box.jpg

 

Now the problem is, when the slider is covered by the text box, it cannot be grabed. See below:

On text box.jpg

The hand tool does nothing. In the compiled code, I cannot grab it either. I have to grab the top part of the slider, which is outside the text box, to be able to move it.

So how I can make sure the text box does not interfere with the controllability of the slider? Thanks!


I don't know why what I describe doesn't work for you -- it works just fine for me, and (I believe) is a simpler solution than the one you chose.  I tried saving it as a Snippet, but because it used a Decoration, it didn't work, so here it is, saved as a VI.  I'm interested in what functionality you want that this doesn't have ...

 

Bob Schor

0 Kudos
Message 6 of 6
(3,519 Views)