LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you programmatically change a picture control frame/border

Solved!
Go to solution

Ben's the expert, but I think you could not only change the colors, but set the size and position for all of them whenever you moved the picture control...make a subvi that does all that with the inputs being the size, position (anything else?) of the picture control and let-er-go.

 

Hummer1

0 Kudos
Message 21 of 28
(1,452 Views)

Thanks you all !!

 

I think Darin's workaround will be the best

 

0 Kudos
Message 22 of 28
(1,442 Views)

Ben wrote:

Darin.K wrote:
What I am about to suggest may be too radical for your use, but it comes from years of delving into the inner workings of the Picture Indicator along with an in-depth knowledge of property nodes, scripting and Xcontrols.  Now that you are prepared, I suggest that you draw a rectangle around the perimeter of your picture and use the color of your choice.

 

That was one of the other ideas I had but held my hand since it would complicate the draw. Performance wise that is about the best approach since there is no overlap of objects.

 

Ben


That was the obvious suggestion I had, but figured the discussion had gotten this far for one of two reasons. 

The OP wanted a fancy border with the shading that the border has, or the OP didn't want to draw on his drawing.

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 23 of 28
(1,435 Views)

I am usually not the "wet blanket" but I had to read the previous posts a couple of times to make sure the obvious had not been stated.  This is another one of those cases where the question you wished had been asked is more fun than the actual question.  For many controls, these tricks are very useful, but when I look at the Picture indicator I see a blank canvas, and whatever effects I want can usually be done with relative ease inside the control itself.

0 Kudos
Message 24 of 28
(1,427 Views)

If it is a fancy border you want, a simple way to fake it is the following.  Maybe not quite as nice as the built-in border, but a step up over just a line.  I left out my usual checks that a frame exists before replacing it in this simple example.

 

 

Message Edited by Darin.K on 12-03-2009 05:39 PM
Download All
0 Kudos
Message 25 of 28
(1,408 Views)

Ben wrote:

So we have to resort to which index for that decoration which is not to complicated unless you have more than one decoration and by the way their order is determined by there drop on the FP order and it someting get deleted then indexes shift so...


Actually I discovered today after some time debugging, that the order is based on Z-order starting with the front most, not the order in which they were dropped.  Play with the z order on the attached VI...

--
Tim Elsey
Certified LabVIEW Architect
Message 26 of 28
(1,383 Views)

Nice one Darin...there you go, thinking INSIDE the box again.

 

 

Good work!

 

Hummer1

Message 27 of 28
(1,379 Views)

Hummer1 wrote:

Nice one Darin...there you go, thinking INSIDE the box again.

 

 


 

Again?  Name the last time.  Actually, as an astrophysicist I am trained to think in higher dimensions, so I am actually thinking inside the hypercube.

 

In this case maybe n=3.  Besides, I had to defend the honor of the Picture Indicator.  Booleans?!  We don't need no stinking Booleans!

 

Message 28 of 28
(1,363 Views)