Jump to content

Event Value Change Color Box Error


Recommended Posts

I had the recently posed the question of accessing the Color Palette: How to do this? using a SRTM and coded a sub-optimum solution (which I was tryign to avoid) by using a popup Dialog VI with Color Box control so the user can access the palette this way (the listbox property nodes code allows me to know which cell was right clicked).

However, in my simple subVI ColorPalettePopup.vi (which contains the Color Box control) I use an Event: "Color Box": Value Change.

Every second time the subVI is called it automatically fires the Value Change event without the user initiating it.

Every other time it functions correctly.

Am I going crazy? :wacko:

Am I doing something wrong?

Does this happen on other people's LV?

post-10325-1211681781.png?width=400

post-941-0-01690900-1394602092.png

Code is in LV8.0

Cheers

JG

Link to comment

QUOTE (tcplomp @ May 25 2008, 01:49 PM)

I can't open your code, but have you set maybe the 're-initialize all to default on call' in the VI options active?

Ton

Thanks for taking a look Ton.

I have reattached another version in case I made a mistake.

Code written in 8.5 saved for previous version 8.0.

When I load the attached in 8.5 then close it, it asks to save changes - so it should be in LV8.0.

If it doesn't work - may be a property node difference between versions?

Defineately works in 8.5 if you have it.

Is the above suggestion found in VI properties?

Link to comment

So you have to do this in your code then...

post-941-1211753844.png?width=400

Maybe it's because LabVIEW supports foreground and background colors for colors in development environment, and the Color Boxes gets 2 event one for the foreground and then one for the background color.

post-941-1211754105.png?width=400

//Mikael

Link to comment

QUOTE (Yen @ May 26 2008, 03:40 AM)

QUOTE (MikaelH @ May 26 2008, 06:22 AM)

Maybe it's because LabVIEW supports foreground and background colors for colors in development environment, and the Color Boxes gets 2 event one for the foreground and then one for the background color.

//Mikael

Thanks guys, a simple edit will make it work.

Given your two different posts, I am interested to know if it is desired behaviour or a bug!

post-10325-1211765688.png?width=400

Download File:post-10325-1211765704.vi

Code is in LV8.0

Link to comment

QUOTE (Yen @ May 25 2008, 10:40 PM)

It looks like the Value Change event for a color box is fired twice even in the current beta. I'll report it.

Here's a much more simplified example (8.0).

Can you add to the report that if you in the color dialog window press the more colors button, and press Cancel button in the more advanced color dialog window, the event gets still fired.

Link to comment

QUOTE (Tomi Maila @ May 26 2008, 01:58 PM)

Can you add to the report that if you in the color dialog window press the more colors button, and press Cancel button in the more advanced color dialog window, the event gets still fired.

OK I am leaning towards bug :)

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.

Guest
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.