-
Nov 29th, 2023, 08:13 PM
#1
Thread Starter
New Member
How do I force a canvas on an unviewed tab to have a size set in advance?
I'm working on an application that has two different tabs on the main window. Each tab has it's own canvas as a child object. When the tab selection is changed I redraw the canvas on that tab.
The problem is, when a user switches to the second tab for the first tab, the "tab changed" event fires before the canvas on the second tab has been assigned a size (debugging shows it has a size of 0,0). As such, the custom elements I add to it don't draw correctly since they are size dependent. If it redraws after the tab has been opened already it works fine since the size has been set by that point.
Can someone please suggest a way to have the size set before the tab is first selected or is there some other trick I can use?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|