Jump to content

It'is possible to modify the control z-order?


Recommended Posts

Hello everybody in the comunity!

I'm a novice in LabVIEW programming! I wold like to change programmatically the z-order of the controls, so I can put a control behind another control! Is there some property to change (or to set) or some method to invoke to obtein the effect?

Thank you, and I apologize for my English!

Federico

Link to comment

Federico Hi

what is the efect you try to get? can you post an example

its importent to know the fllow: :nono:

"If you have controls overlapped with other objects, their display rate is significantly slower. The reason for this is that if a control is partially obscured, more work must be done to redraw that area of the screen. Unless you have the Smooth Updates preference on, you might see more flicker when controls are overlapped."

http://zone.ni.com/devzone/conceptd.nsf/we...6256A37005541D3

Link to comment

Thank you Jonathan!

Your solution is very clever! But doesn't scale! I have 15 control that reproduce real object in an assembly line, so the object may be stacked in many cases! For a single stack (I have 11 stack in my GUI), with your solution, I must manage "15!" cases and so, "15!*15" controls!!! (right?)

Can you suggest me another solution?

Thank you!

Link to comment

Federico: Can you use a picture control to achieve the desired result?. You can obtain a control's image by invoking the VI Server method Get Image. You can then draw this image on a picture control. You can do this multiple times, draw them in different positions, and in the desired (Z) orders. You only need one real control for each type of control you wish to draw -- you can change the control to the desired value. However, if users need to interact with the controls, it gets tricky.

Link to comment

Thank you Jim!

I tried your solution, and i have attached a simple vi... the starting point of long walk toward the unknown!!!

The problem is that as you suspected: users need to interact with the controls!

Do you have you other suggestions for me?

Anyway, thank you again!

Federico

opss...

this is the fast implementation of your (Jim) solution... i forgot to attach the file!

Federico

Download File:post-3954-1138037664.zip

Link to comment
Thank you Jim!

I tried your solution, and i have attached a simple vi... the starting point of long walk toward the unknown!!!

The problem is that as you suspected: users need to interact with the controls!

Do you have you other suggestions for me?

I have seen tricks where a "real" control, which is usually hidden, is moved under the mouse and made visible as the user moves mouses over the control images inside the picture control -- it is not perceivable by the user. This allows the user to interact with the real control.

Link to comment
I have seen tricks where a "real" control, which is usually hidden, is moved under the mouse and made visible as the user moves mouses over the control images inside the picture control -- it is not perceivable by the user. This allows the user to interact with the real control.

I think that Jim's approach would be the best and is not too bad to implement. You already have the mouse coordinates. You could (and should) use an event structure to trap user clicks on the picture control.

No matter how you look at it, however, you have a tough challenge. Sometimes the easiest solution is to just remove the requirement. Do you really need this GUI or is there some other approach.

Link to comment

Thank Jim and Michael!

I apologize for my absence from the forum!

I have seen your last posts and I undertand how to implement your solution, but, as Michael sais "[...] Sometimes the easiest solution is to just remove the requirement. [...]". I found an anlternative (better?) way to implement the interaction with the user! I can dispose the controls in different order to make them all visible, so the user can interact with them!

Anyway, thank you very must: in your forum I find a lot of willingness!

Federico

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.