04-28-2012 04:25 PM
I know I can change the position, but can I change the width of a ListBox with scripting?
04-28-2012 06:33 PM
Property node - Size:Width.
Lynn
04-29-2012 02:44 PM
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
04-29-2012 03:01 PM
He said Size->Width not Bounds->Width!
04-29-2012 03:15 PM
Oops! My opologies. I'll look for Size.
ThanX all.
1LMR
04-29-2012 03:27 PM
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
04-29-2012 03:41 PM
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
04-29-2012 04:23 PM - edited 04-29-2012 04:26 PM
@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.
04-29-2012 04:32 PM
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
04-30-2012 07:33 AM - edited 04-30-2012 07:35 AM
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.