Jump to content

Personnalize color and/or Icon of two instances of same class

Recommended Posts

Bobillier: It isn't really meaningful to color a particular instance of an object -- from wire to wire, it isn't necessarily the same object. It's the same as asking to have different color wires for two integers in the diagram or two strings.

If the two things really represent different concepts in your system, you might create two different classes, both inheriting from the same parent class. Classes are distinguished on identity, state, and behavior, and there are good arguments for making two things be different data types even when they both have identical APIs.

LabVIEW has never introduced distinct colors for individual typedefs (.ctl).

Edited by Aristos Queue
Link to comment

Aristos Queue: I understand than it's not meaningful and if you see instance like all strings or num who have same appearance .

But i found your proposition to create heritage class a bit excessive. If in your diagram you need 10 intances, you need 10 sub-class.

Just to visually distinguish them. 🤪 . Perhaps one better Labview feature will be to add one specific Layer on icon with instance number when you place class on the diagram , or have possibility to just modify wire color in the diagram (without  modify class wire color )

Link to comment
On 12/2/2020 at 10:48 AM, Bobillier said:

or have possibility to just modify wire color in the diagram (without  modify class wire color )

Data color implies data type in G. Speaking only for myself as a G programmer, that's not an invariant I would want a developer on my team to be able to mess with. It would be a disaster of incomprehensibility if an orange wire running around was secretly an integer. Even just shades of blue would be a problem. I would put a hard stop against such a feature in my team's style guide if LV R&D ever decided to add it... and I have a hard time imagining LV R&D adding it. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.