europa.io Posted January 22, 2006 Report Share Posted January 22, 2006 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 Quote Link to comment
Jim Kring Posted January 22, 2006 Report Share Posted January 22, 2006 There is no way to do this at run-time. You can probably use the Visible property to achieve the desired effect. Quote Link to comment
yonatan.tidhar Posted January 23, 2006 Report Share Posted January 23, 2006 Federico Hi what is the efect you try to get? can you post an example its importent to know the fllow: "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 Quote Link to comment
europa.io Posted January 23, 2006 Author Report Share Posted January 23, 2006 Thank you to Jim and Jonathan! Jonathan, I have some control that I animate to simulate the real object movements. Some object must be overlapped to other, and this must be done dinamically (i.e. programmatically). I attached and example of front panel to explain better what I need! Thank you again! Federico Download File:post-3954-1138014095.zip Quote Link to comment
yonatan.tidhar Posted January 23, 2006 Report Share Posted January 23, 2006 as jim wrote its not option in runtime what about having child window that move on the screen ? I attached example of achieving it using show/hide properties. :beer: Download File:post-2756-1138019915.vi Quote Link to comment
europa.io Posted January 23, 2006 Author Report Share Posted January 23, 2006 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! Quote Link to comment
Jim Kring Posted January 23, 2006 Report Share Posted January 23, 2006 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. Quote Link to comment
europa.io Posted January 23, 2006 Author Report Share Posted January 23, 2006 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 Quote Link to comment
Jim Kring Posted January 23, 2006 Report Share Posted January 23, 2006 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. Quote Link to comment
Michael Aivaliotis Posted January 24, 2006 Report Share Posted January 24, 2006 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. Quote Link to comment
europa.io Posted January 25, 2006 Author Report Share Posted January 25, 2006 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.