LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

picture control: stick image to corner

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)

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 7
(3,889 Views)

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

Message 2 of 7
(3,872 Views)

I posted this idea in the CVI Idea Exchange Forum

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 3 of 7
(3,854 Views)

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.

 

 

Kevin B.
0 Kudos
Message 4 of 7
(3,819 Views)

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?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 5 of 7
(3,811 Views)

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.

Kevin B.
0 Kudos
Message 6 of 7
(3,796 Views)

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.

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 7 of 7
(3,741 Views)