Cyotek Forums

Source Code => Source Code => Topic started by: shchiu on September 09, 2017, 01:13:24 AM

Title: Anchor transparent label to ImageBox
Post by: shchiu on September 09, 2017, 01:13:24 AM
Thank you very much for the implementation of ImageBox!  Been finding it very useful!  I do have a question on how best to add a floating label (e.g. to the lower left corner) within the ImageBox such that it is anchored to its border even when zooming and scrolling?  I can do it by anchoring to the panel but I would much prefer to use the loaded image as the BackColor instead of color of my panel.  I am currently using v1.2.1.  Thank you in advance for your help!
Title: Re: Anchor transparent label to ImageBox
Post by: Richard Moss on September 09, 2017, 10:31:02 AM
Hello,

Welcome to the forums and thanks for the question. The functionality you're looking for is already built into ImageBox without needing to use actual Label controls. Have you tried this or does it not fill your needs? As well as the standard Text, Font and ForeColor properties, the following custom properties are available


See the Text Demonstration window in the demo application for an example.

(https://www.cyotek.com/files/forumimages/imagebox-text.png)

Hope this helps, let me know if otherwise.

Regards;
Richard Moss

Edit: Updated as I forgot to mention TextDisplayMode.
Title: Re: Anchor transparent label to ImageBox
Post by: shchiu on September 12, 2017, 01:59:10 AM
This is great!  Exactly what I need!  Thank you so much, Richard!