03-01-2011 06:55 AM
In a Picture Control, with the option "Stick image to corner" the image is sticked to the upper-left corner of the control.
Is there a way to select the corner to which the image is sticked (upper-left, bottom-left, upper-right, bottom-right)?
I've been thinking to this properties because I have some picture controls used as a background images, and I need the background isn't moved when I drag a splitter (see attachment)
03-01-2011 10:58 AM
No, unfortunately there is no way to select the corner of the picture control.
The only solution I can think right now of is to replace the picture control on the right with a canvas control, and each time you receive an EVENT_DROPPED notification from the splitter, you would have to redraw the bitmap using the CanvasDrawBitmap function, which allows you to position the bitmap exactly where you want it.
Luis
03-02-2011 12:56 AM
I posted this idea in the CVI Idea Exchange Forum
03-03-2011 04:18 PM
One option you have is to not attach the picture control on the right to the splitter. Make sure your image is big enough to accomodate the maximum size of the full panel and you've got the functionality you want. I modified your original panel just to show you how this would work.
03-04-2011 01:32 AM
Probably it would have been better if I had posted an uir file that shows the "real" situation of the project I've been working on.
As a matter of fact my application has a vertical splitter and two horizontal splitters:
I'd already tried several workarounds but I didn't find a solution for the bottom-right background image.
In the first post I attached a simple panel, but in this one I attached an uir that shows the issue of my application.
Is there any workaround for the bottom-right image?
03-04-2011 02:35 PM
I modified the new UIR to hopefully give you the functionality you want. I attached the upper right bitmap to the right horizontal splitter and sized it so that the bottom lined up with that splitter. I then disconnected the lower right bitmap from all splitters and sized it to fill the entire panel. Hopefully that's what you're looking for.
03-10-2011 05:07 AM
The final behavior is what I want, but I'm worried about the graphical performances using images as large as the whole panel overlapping each others.
My images are 4 small images sticked to the four corners of the panel.