02-15-2012 06:42 PM
I attended the NI XControl webcast this morning (for the second time), this time with the intention to start using them.
My long term goal (end of the week?) is to go around the limitations of the 3D Graph objects and develop my own combo of image, XY Graphs and whatever menus I will find necessary for the job.
But the bottom line is that I will need to combine existing objects and make sure they behave as a unit.
So there I go, putting my newly acquired (appearance of) knowledge to the test and drop an image control to replace the default DBL control offered as Data type in a new control, set the Facade.vi Window Size option to "Scale all objects on front panel as the window resizes", save everything and drop the XControl (basically the default IMAQ Vision Image control) on a new VI and try to rescale it.
Before:
After:
Wow, that's nice...Everything as become totally misaligned...and some of the components (Image info at the bottom and tools palette to the left) are even partially hidden.
By comparison, here is what happens when you resize a native Image object:
So, does it mean I need to monitor all "Panel Resize"event and try to juggle with the different object components to keep them together? I am not even sure that is possible with the Image object...
Also, it appears that I can not use any of the contextual menu items of the Image object anymore (such as show/hide the Toolbar, Image Info, etc). So do I need to reimplement those as a user contextual menu?
Clearly, I am way over my head in this supposedly simple test. Pointers would be appreciated!
02-16-2012 01:40 AM - edited 02-16-2012 01:41 AM
I use splitter bars and automatic front panel re-sizing to achieve what you are looking for. ou certainly don't need to monitor all of the panel resize events.
Getting the optimal layout is sometimes a pain, but splitting the front panel (X-Control has it's own FP) into the right areas for scaling and then telling LV to do the work for you is the best bet.
Shane.
02-16-2012 11:12 AM
OK, that's a worthy trick. But that also means that I'll loose the ability to grab the tools palette and move it to another location. That's what I have a hard time to get used to a this point: the original object may give a lot of freedom for the user to configure its appearance, and you loose most of that when you encapsulate it into its own panel (whose boundaries you are pretty much left to play with)...
02-17-2012 06:54 AM
Yeah, if you want to be able to re-connect things in edit-time, you'll either need a more sophisticated Xcontrol or somehow dynamically link multiple Xcontrols. Not worth it I reckon.
Shane
02-17-2012 11:48 AM
I'd say that calls for an XXXControl...
02-17-2012 12:21 PM
@X. wrote:
I'd say that calls for an XXXControl...
Who better to figure that out than a guy whose alias is X.
![]()