Vertically align text in string gadget?
Posted: Sun Oct 16, 2005 11:44 pm
The following code in the WM_PAINT event of the parent control of a string gadget allows me to position the text within a string gadget:
However, as soon as I click within the string gadget to edit the text, the caret etc. appears back at the top left!
Anyone know how to set the equivalent of a 'top' margin in a single-line string gadget? Reckon I'm overlooking something simple!
Code: Select all
case #WM_PAINT
text$=getgadgettext(stringid)
beginpaint_(hWnd, @lp.PAINTSTRUCT)
selectobject_(lp\hdc, usefont(1))
TextOut_(lp\hdc,lp\rcPaint\left+5, lp\rcPaint\top + 14, @text$, LEN(text$))
endpaint_(hWnd, @lp)
result = 0
Anyone know how to set the equivalent of a 'top' margin in a single-line string gadget? Reckon I'm overlooking something simple!