dulux-oz
April 1st, 2017, 04:24
Hi Guys,
Is there a way (ie a function or technique) to force the system to redraw a window instance (programmatically)?
My issue is that a dynamically sized subwindow is being drawn too big and I need to trigger a redraw, because as soon as I drag the parent window's edge (even by just 1 pixel) the redraw happens and everything is AOK. I've tried issuing a resize() via the subwindow's onInit() and also via the parent's onInit(), and while the resize() does occur (verified by a Debug.console(getSize()) embedded in the resize()/onInit()) and the values given are correct, but the windowinstance is still being draw approx 105 px too wide on first viewing.
If people would like an example load up my DOE: Alignment Graph Extension (doesn't maker which Ruleset - use CoreRPG for consistency) and immediately select the Quiz Tab (mislabeled as "Quix") - the right-hand edges of the top and right-hand windowframes are anchored to the right-hand edge of the subwindow. If you then turn off/on the Instructions via the Checkbox everything is suddenly lined up properly - (for the record, all the onValueChanged() function of the checkbox does is set the height of the top windowframe ie setAnchoredHeight("55")/setAnchoredHeight("195"), plus turn on/off a couple of strings).
Cheers
Is there a way (ie a function or technique) to force the system to redraw a window instance (programmatically)?
My issue is that a dynamically sized subwindow is being drawn too big and I need to trigger a redraw, because as soon as I drag the parent window's edge (even by just 1 pixel) the redraw happens and everything is AOK. I've tried issuing a resize() via the subwindow's onInit() and also via the parent's onInit(), and while the resize() does occur (verified by a Debug.console(getSize()) embedded in the resize()/onInit()) and the values given are correct, but the windowinstance is still being draw approx 105 px too wide on first viewing.
If people would like an example load up my DOE: Alignment Graph Extension (doesn't maker which Ruleset - use CoreRPG for consistency) and immediately select the Quiz Tab (mislabeled as "Quix") - the right-hand edges of the top and right-hand windowframes are anchored to the right-hand edge of the subwindow. If you then turn off/on the Instructions via the Checkbox everything is suddenly lined up properly - (for the record, all the onValueChanged() function of the checkbox does is set the height of the top windowframe ie setAnchoredHeight("55")/setAnchoredHeight("195"), plus turn on/off a couple of strings).
Cheers