06-23-2014 05:43 AM
Ok one for you clever guys
I'm putting a vertical splitter bar on the RHS of a front panel which I want to be able to programmatically move (expand to the left) to allow access to a set of buttons that will control the displayed origin on the LH pane (then close again after the selected option is chosen). This is not a problem.
some additional info.
I programatically move some controls and indicators.
Some controls indicators and decorations remain on the FP in a none viewable area these can be displayed by moving the top LH corner of the pane to a new set of coordinates.
What I need to do.
I need to move to the far RHS of my FP to insert the splitter bar (so controls/indicators/decorations are not split between the panes),
now when I do this LV moves the origin to the current top left corner messing up the coordinate system big time!!!
I created a support issue but think you guys can help me quicker
My thoughts are to create a script to place a splitter bar in the correct off screen position leaving the origin where it should be. I don't know if this will work though as my scripting skills are not quite there yet.
any other thoughts?
Steve
06-24-2014 03:39 AM
The problem is with splitters you have to seperate the idea of front panel and panes, each side has it's own pane with its own co-ordinate system so what you see is that being created, not that this helps at all!
The quick fix would be to measure the offset from the origin before you drop the splitter, you could then just use this as an offset value for your existing origin moves to prevent you from recalculating everything. I would expect this maybe simpler but I don't know if I am missing something.
06-24-2014 04:06 AM
Hi James
Just seemed strangeto me that you'd change the origin of the original panel?
I got a response from NI to reference all components on the front panel then move them as required.
my get around was to programattically move the FP to 0,0 then move to the new position to the far right of my existing compnoents, create a splitter bar (origin of both panes now set to top left of current screen), then move the original pane back to its original position far left (moved by the offset used in the first move) create a nother splitter bar (origin now back in its correct position) then delete the second splitter. all done I hope.
06-26-2014 02:29 AM
Oh yeah don't get me wrong, that does seem like an wierd behaviour!