LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get all objects located on the front panel?

Hi GerdW,

 

I have checked my calculations and I believe it's correct. The value that is calculated inside the case structure (which is deactivated) if I use this value to assign a new position for the controls manually using a property node, the elements move to the new correct position. But in order to do this I use the following reference (in the picture below), which I noticed is different than the refernce array obtained if I am trying to get all the objects on the tab page at once. The first has DigNum (strict) as its class while the other has Elem as class type. I believe there are differences between both, and maybe this is where the problem lies?

 

best regards

 

 

0 Kudos
Message 11 of 20
(1,183 Views)

That may help, but it is way too complicated for me to understand. I see that there is some LVOOP, which might be even harder Smiley Very Happy

 

Anyways, is this a plugin that can be integrated into any LV code for resizing the FP or I am supposed to understand how it words and implement the same in my program?

0 Kudos
Message 12 of 20
(1,179 Views)

Because I am using splitter bars in my program as well, so that option is unfortunately turned off!

0 Kudos
Message 13 of 20
(1,179 Views)

@Valdievil wrote:

Hi GerdW,

 

I have checked my calculations and I believe it's correct. The value that is calculated inside the case structure (which is deactivated) if I use this value to assign a new position for the controls manually using a property node, the elements move to the new correct position. But in order to do this I use the following reference (in the picture below), which I noticed is different than the refernce array obtained if I am trying to get all the objects on the tab page at once. The first has DigNum (strict) as its class while the other has Elem as class type. I believe there are differences between both, and maybe this is where the problem lies?

 

best regards

 

 


Forgot to post the image...

 

 

0 Kudos
Message 14 of 20
(1,170 Views)

@Valdievil wrote:

That may help, but it is way too complicated for me to understand. I see that there is some LVOOP, which might be even harder Smiley Very Happy


Without LVOOP, it would have been near impossible to make. It makes things easier, not harder!

 

Just look at the presentation, and the examples. It's not that hard.

 


@Valdievil wrote:

Anyways, is this a plugin that can be integrated into any LV code for resizing the FP


It's a library, and it can be integrated into any LV program for resizing the FP.

 


@Valdievil wrote:

or I am supposed to understand how it words and implement the same in my program?


I'd (re)use the library. But it's open source, and the presentation explains some tricks and OO patterns that you can use for your own purposes.

0 Kudos
Message 15 of 20
(1,169 Views)

@Valdievil wrote:

Because I am using splitter bars in my program as well, so that option is unfortunately turned off!


Not sure how that makes a difference. Not even sure what you're responding to (use the QUOTE button).

 

The library works fine with splitters. You can even make (fake) dynamic splitters. So (any number of) panes can be shown\hidden dynamically.

0 Kudos
Message 16 of 20
(1,169 Views)

@Valdievil wrote:

@Valdievil wrote:

Hi GerdW,

 

I have checked my calculations and I believe it's correct. The value that is calculated inside the case structure (which is deactivated) if I use this value to assign a new position for the controls manually using a property node, the elements move to the new correct position. But in order to do this I use the following reference (in the picture below), which I noticed is different than the refernce array obtained if I am trying to get all the objects on the tab page at once. The first has DigNum (strict) as its class while the other has Elem as class type. I believe there are differences between both, and maybe this is where the problem lies?

 

best regards

 

 


Forgot to post the image...

 

 


Setting the position of a control\indicator\decoration is relative to the origin of the pane.

 

If the origin of the pane isn't set to (0,0), the position is probably not what you 'd expect (although technically correct).

0 Kudos
Message 17 of 20
(1,165 Views)

@Valdievil wrote:

...

If I am adressing several objects at once through references, then I don't find this property in the property node. But adressing each object individually allows to do so.

...

That is because size properties are different for different classes of controls.  There isn't a size property for a generic control.  A long time ago, I created a VI to get the size of any G Object; see attached VI (I should replace it with an XNode).

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 18 of 20
(1,136 Views)

wiebe@CARYA wrote:

@Valdievil wrote:

That may help, but it is way too complicated for me to understand. I see that there is some LVOOP, which might be even harder Smiley Very Happy


Without LVOOP, it would have been near impossible to make. It makes things easier, not harder!

 

Just look at the presentation, and the examples. It's not that hard.

 


@Valdievil wrote:

Anyways, is this a plugin that can be integrated into any LV code for resizing the FP


It's a library, and it can be integrated into any LV program for resizing the FP.

 


@Valdievil wrote:

or I am supposed to understand how it words and implement the same in my program?


I'd (re)use the library. But it's open source, and the presentation explains some tricks and OO patterns that you can use for your own purposes.


LVOOP makes things easier for those who understand it and know how to use it. I am fairly a beginner in LV so it will be hard for me to grasp all the knowledge at once, as your library requires advanced skills I assume.

 

I will watch the presentation and see what I can do, in case I have questions regarding the usage of your library, can I ask you here? I actually have one question before I start with it, is it possible using this library to resize a front panel and use the same code to resize a slightly modified front panel of the original one without changing the code, or using the library I have to specify new bounds and coordinates for each object I add to the front panel?

 

ps: nevermind the other posts I was replying to paul_cardinale's suggestion.

0 Kudos
Message 19 of 20
(1,118 Views)

@Valdievil wrote:

wiebe@CARYA wrote:

@Valdievil wrote:

That may help, but it is way too complicated for me to understand. I see that there is some LVOOP, which might be even harder Smiley Very Happy


Without LVOOP, it would have been near impossible to make. It makes things easier, not harder!

 

Just look at the presentation, and the examples. It's not that hard.

 


@Valdievil wrote:

Anyways, is this a plugin that can be integrated into any LV code for resizing the FP


It's a library, and it can be integrated into any LV program for resizing the FP.

 


@Valdievil wrote:

or I am supposed to understand how it words and implement the same in my program?


I'd (re)use the library. But it's open source, and the presentation explains some tricks and OO patterns that you can use for your own purposes.


LVOOP makes things easier for those who understand it and know how to use it. I am fairly a beginner in LV so it will be hard for me to grasp all the knowledge at once, as your library requires advanced skills I assume.

Using a class is a lot easier than designing\making a class based library (at least a non-trivial one).

 

Still, a library with the same functionality without OO would be very hard to make and to use.

 


@Valdievil wrote:

I will watch the presentation and see what I can do, in case I have questions regarding the usage of your library, can I ask you here? 


Sure. I'm subscribed to this one. Post a new question if it's way of topic. I might miss it though, but you can post a link here.

 

@Valdievil wrote:

I actually have one question before I start with it, is it possible using this library to resize a front panel and use the same code to resize a slightly modified front panel of the original one without changing the code, or using the library I have to specify new bounds and coordinates for each object I add to the front panel?

You'd typically put the VIs together in some (the right) way. Often the inputs are static, fixed. The inputs can come from the user, an input, a file, or whatever.

 

If you want two slightly different front panels, you can also use the library to show\hide parts.

 

Not sure if that answers the question.

 

The presentation starts with showing some very basic way of using the library. Then it moves up to complex things. Remember that you can still use (just) the basic stuff.

0 Kudos
Message 20 of 20
(1,100 Views)