Prediction seems best -- can I predict the rectangle's height by knowing the font and how many lines my text will be?
Second best would be a sequence like the following -- is this, or anything else that solves the problem, doable?
- Inhibit refresh -- to prevent any possible flicker
- Draw.Text()
- Somehow force the text object object be rendered
- Inspect the Text object for its height (object.layoutRect.Height?)
- Position the Text object (object.Anchor.Price and object.YPixelOffset)
- Restore refresh
I''ve got to be overlooking some simple solution. Advice appreciated.
Thanks
EV
Comment