forum-msg-id-133673-edit

Original date:2019-03-22 08:46:33 Edited by: petelomax Subject: Re: centering display

Senator said...
euphoric said...

Since it's a string anyway, you could use

display("[c:" & sprint(RM) & "]", {"This text is not centered"}) 

That's one way.

Thanks euphoric, works like a charm. smile

Yeah, but doesn't that say This text is not centered when actually it is centered? scnr blink

On a slightly more serious note,

printf(1,">%6s<\n",{"four"}) -- produces ">  four<" 
printf(1,">%-6s<\n",{"four"}) -- produces ">four  <" 

Does anyone any have any suggestion/preference for a format string that would produce "> four <"?
(Obviously, there isn't one, but if I were to implement it what would feel right as the third alternative to "%6s" and "%-6s", "%|6s"?)

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu