Re: Right Justify in a Window
- Posted by DerekParnell (admin) Jun 09, 2009
- 824 views
doncole2009 said...
Can anybody show how to right justify text in a window using mPuts or mPrint?
Something along the lines of this (this is from memory BTW)
integer textsize = getTextWidth(yourtext)
sequence boxsize = getClientSize(yourcontrol)
integer rightmargin = floor(getTextWidth("M") / 2)
-- I think [2] is width of control
integer col = boxsize[2] - textsize - rightmargin
wPuts(yourcontrol, {row, col, yourtext})

