LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modify an object with scripting

I know I can change the position, but can I change the width of a ListBox with scripting?

0 Kudos
Message 1 of 10
(3,262 Views)

Property node - Size:Width.

 

Lynn

0 Kudos
Message 2 of 10
(3,253 Views)

 

 

Lynn,

 

Sorry I did not make this explicit, but clearly I have tried the obvious, your "Modify an object with scripting" answer, it was "Read Only", could not set "Bounds:Area Width" to "write". 

 

I was looking for further insight that would work.

 

Did you verify your answer before posting it?  If so, there is something subtle I am missing.

 

ThanX,

1LMR

0 Kudos
Message 3 of 10
(3,235 Views)

He said Size->Width not Bounds->Width!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 10
(3,231 Views)

Oops!  My opologies.  I'll look for Size.

 

ThanX all.

 

1LMR

 

0 Kudos
Message 5 of 10
(3,227 Views)

Rolf,

 

OK, there is a Size:Width in the standard Property Node, but I specified "Scripting".  With the green GObj Property Node there is no Size.  It has only Bounds Read Only.

 

Regards,

1LMR

0 Kudos
Message 6 of 10
(3,225 Views)

More information:  I am returning to LabVIEW after years.  I have this problem with Decorations also.

 

The initial problem is that I do not know how to modify a ListBox or Decoration, etc one pixel at a time.  My assignment is to duplicate something "exactly", and when I try to modify a ListBox or Decoration, LabVIEW jumps multiple pixels so I tried Scripting for the modification, but that seems to have a problem.

 

It seems there is a granularity option for objects in LabVIEW, maybe that is my problem - I'll look.

 

Sorry for the confusion.

 

ThanX

1LMR

 

0 Kudos
Message 7 of 10
(3,223 Views)

@1LMR wrote:

Rolf,

 

OK, there is a Size:Width in the standard Property Node, but I specified "Scripting".  With the green GObj Property Node there is no Size.  It has only Bounds Read Only.

 

Regards,

1LMR


Scripting is simply an extension to the standard VI Server interface, with no clear boundery other than what NI thinks is not everyday use in properties and methods. The option to disable scripting is mainly to make the object hierarchy and property and method menus less crowded and intimidating to a starting LabVIEW user.

 

As such there are properties that apply to any object, and others that apply to a certain group of objects and some that apply only to a specific type. There is no way to set the size of an object on the top level object hierarchy since some objects do not support changing their size at all. So the objects that allow to change their size have such properties in a more class specific level. This means you have to cast generic object refnum into a more specific refnum in order to be able to get at those properties.And you can only cast a refnum into a more specific refnum if the object type actually matches.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 10
(3,217 Views)

Rolf,

 

WoW! ThanX, it will take me a while to process that.

 

I think I have my problems solved via changing FP resolution for Decorations and local non-scripting property nodes for ListBoxes.

 

ThanX All, Got to go,

1LMR

 

0 Kudos
Message 9 of 10
(3,213 Views)

It is important to note that scripting does not work in a compiled application. Only property nodes can be used in an EXE to modify the FP.

 

 

0 Kudos
Message 10 of 10
(3,193 Views)