How does anchor for CTKLabel work? #2633
Replies: 7 comments 4 replies
-
@chess-levin It is not supported with image. Use |
Beta Was this translation helpful? Give feedback.
-
Found a workaround (see code below), but Is there a way to get the background of the
|
Beta Was this translation helpful? Give feedback.
-
@chess-levin If you want anchored text on an image, the only solution we are left with is to use Canvas. |
Beta Was this translation helpful? Give feedback.
-
Hello @dipeshSam Here is my try on a canvas solution, but now the scaling of the background image is a problem (s. screenshot). The image (all my images have the required aspect ratio of 1280:400) is not scaled correctly to fill canvas/window completely as it worked automatically in my CTKLabel solution. Even worse, the visible image section is changing when I move the window between monitors with different resolutions. I've no idea how to fix this scaling problem. Any hint on this?
|
Beta Was this translation helpful? Give feedback.
-
Could you please demonstrate what visible portion is changing? Any video document may be helpful. |
Beta Was this translation helpful? Give feedback.
-
All screenshots I posted above are the same image. The first two screenshots are showing the complete picture. If you compare the last to screenshots you'll see the last one is an enlargement of the upper left corner you could find in the second last screenshot. So I think I have to find a way to get the actual canvas size. Then resizing the image to this dimensions before calling |
Beta Was this translation helpful? Give feedback.
-
Finally, I found a way. I have to manually call Also
|
Beta Was this translation helpful? Give feedback.
-
Hello guys,
I need some help. I've build a simple Frame that should work as a diashow-screensaver in a kiosk mode app. I'd like to show the current date time on top of the current image. I want to be able to change the position of the datetime output. Therefore I tried to use the anchor property of CTKLabel, but no matter which positional argument ('s', 'n', 'e', 'w') I'm trying the text is always centered (on v- and h-axis).
Do I understand the intention of anchor wrongly? Do I have to use another way to show the image in the background than using CTKLabel with an image?
Any idea how I could achieve my requirements?
Beta Was this translation helpful? Give feedback.
All reactions