Moving and grouped components

Recommended Posts


I've written an application which attempts to build a page of user components to based upon a selection of channels by the user. A component group is comprised of a circular gauge, text box and variable value and each group has an enumerated name.

To begin with the 15 components are moved out of the window view by '.MoveTo(1400,0)', then each according to the users pre-selected list of channels, each component in turn is positioned using '.MoveTo(x,y)' where x and y are incremented according by the width and height of the component in a left to right, top to bottom fashion.

Well that's the plan however something odd is occurring... when the page has been built the groups appear to be inter-spaced by blank areas equal to whole multiples of the groups. However in 'Edit' mode it seems that whilst the groups frame is in correct position the contents of that frame are indeed offset from the group - how odd?

After a little probing about I discovered that by selecting any one of a group's components from within any group's sub tree in the workspace view and then, by highlighting any group again, all frames promptly align themselves with their displaced components (all of which are positioned together properly as intended but offset as mentioned).

If the page is then redrawn following the above action when the frames become aligned to their contents (not an entirely expected occurrence) then everything pops into position as intended in the first place. No matter how this strange this to me it gives me confidence that my code is in principle correct, I'm guessing this behaviour is a facet of threading ......

Incidentally this behaviour only seems to apply as far as I can tell to groups and I can perform the a similar page building exercise using variable values for example and this works without a hitch.

Any ideas please as this issue is causing me a deployment headache.

Best wishes,


Link to comment
Share on other sites

I'm not sure exactly what you are seeing and would probably need to see a sample to reproduce.  Personally I wouldn't use groups at all and would instead just move all 3 components in the group.  Also, why use MoveTo?  Why not just place the group and then make it visible / invisible?

Also, be sure and read the EULA concerning generic DAQ apps under Developer.  i don't know what your app does, nor whether you are using the Developer license or not, but I'd thought I'd mention that there is a restriction to creating generic apps that would otherwise compete with DAQFactory itself.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.