LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to force the control switch to indicator in xcontrol?

Hi all,

  I started my own xcontrol by putting a single path control in the UI. In the event of direction change, I set the the property of the indicator of the path object based on the "direction". But I found that it doesn't really change the control (path object) to indicator (since the file browser button still there).

 

dt.png

 

Any one has any idea how to make it work?

0 Kudos
Message 1 of 12
(3,656 Views)

You should also change the visibility of the browse button (as well as the disabled status and background color).

 

(I believe the "indicator" property is only available in edit mode)

 

(Also note that your BG color property node belongs after the case structure, because it needs to be written in either case. Only the color constant belongs inside the case (or use a "select" function instead of the case structure).)

0 Kudos
Message 2 of 12
(3,632 Views)

@altenbach wrote:

You should also change the visibility of the browse button (as well as the disabled status and background color).

 

(I believe the "indicator" property is only available in edit mode)

 

(Also note that your BG color property node belongs after the case structure, because it needs to be written in either case. Only the color constant belongs inside the case (or use a "select" function instead of the case structure).)


You are right. To set the browser button invibible will make it "more" like the indicator mode. But it still have the space left after the browser button becomes invibsible. I tried long time but still can't get rid of that space. I think that's what I can do

0 Kudos
Message 3 of 12
(3,604 Views)

Please explain what you mean by "space"?

 

You can also place a path control and a path indicator on top of each other and show the correct one according to the xcontrol direction. Have a look at the thermometer xcontrol example in the example finder (search for xcontrol). That's exactly what they are doing.

0 Kudos
Message 4 of 12
(3,594 Views)

@altenbach wrote:

Please explain what you mean by "space"?

 

You can also place a path control and a path indicator on top of each other and show the correct one according to the xcontrol direction. Have a look at the thermometer xcontrol example in the example finder (search for xcontrol). That's exactly what they are doing.


sc.png

As shown in above image. The top one is my xcontrol, in which I wrap a path control and I set the it indicator by changing the color and make the browser button invibible. But you will see there is still space left (red region).

 

The bottom one is the standard path control. After we change that to indicator, the browser button and space gone.

0 Kudos
Message 5 of 12
(3,589 Views)

Well, that's why you should attach some code. I did not know you are using silver controls (I was trying the moderns path control instead).

 

What is your LabVIEW version? (I don't see that "space" when hiding the browse button).

 

Anyway, use the solution I just suggested.

 

0 Kudos
Message 6 of 12
(3,585 Views)

@altenbach wrote:

Well, that's why you should attach some code. I did not know you are using silver controls (I was trying the moderns path control instead).

 

What is your LabVIEW version? (I don't see that "space" when hiding the browse button).

 

Anyway, use the solution I just suggested.

 


I am using LV2013. You mean in the version your are using, evening you , make the button invisible, the "space" will be hided also? Anyway, I think stacking indictor and control is good enough for me. Thanks.

0 Kudos
Message 7 of 12
(3,581 Views)

@dragondriver wrote:

I am using LV2013. You mean in the version your are using, evening you , make the button invisible, the "space" will be hided also? Anyway, I think stacking indictor and control is good enough for me. Thanks.

If I use LabVIEW 2012, place a silver path control, then hide the browse button (right-click...visible items), the frame border is even. I have not tried programmatic changes.

0 Kudos
Message 8 of 12
(3,578 Views)

@altenbach wrote:

@dragondriver wrote:

I am using LV2013. You mean in the version your are using, evening you , make the button invisible, the "space" will be hided also? Anyway, I think stacking indictor and control is good enough for me. Thanks.

If I use LabVIEW 2012, place a silver path control, then hide the browse button (right-click...visible items), the frame border is even. I have not tried programmatic changes.


I tried the same way and see the same thing too. But just don't know why it behave differently when I do that with program.

0 Kudos
Message 9 of 12
(3,573 Views)

"What is your LabVIEW version? (I don't see that "space" when hiding the browse button)."

 


Capture.PNGCapture1.PNG

Control style does seem to have some effect-  Scale object with pane doesn't-  Smiley Surprised  Hi-Ho Silver!  (DK is going to go nuts when reads this)


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 12
(3,572 Views)