Re: Right Justify in a Window

new topic     » goto parent     » topic index » view thread      » older message » newer message
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}) 

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu