Here is a GIF of it in action. This is the program that is available on the wiki: http://www.computerc...ndow.reposition
As you can see, there is a really weird bug where the window size is drawn sometimes larger and sometimes smaller than it actually is.
I ran another test, and really, it draws it larger than it actually is. Here is a GIF of where I iterate from 1 to 20 and set it as the width of the window, then loop over the width of the window and color each column in a different color. As you can see, it draws the box exactly twice minus one as wide as I set it.
Looking at the Window API source, I figured it is because each time the window is re-positioned, the contents of it are multiplied, not just added a blank space.
Here are the lines 402 to 404 in the source:
text = tOldLine.text .. string_sub( sEmptyText, 1, nWidth + 1, nNewWidth ),
textColor = tOldLine.textColor .. string_sub( sEmptyTextColor, 1, nWidth + 1, nNewWidth ),
backgroundColor = tOldLine.backgroundColor .. string_sub( sEmptyBackgroundColor, 1, nWidth + 1, nNewWidth ),
Here is what they should be
text = tOldLine.text .. string_sub( sEmptyText, 1, nNewWidth - (nWidth + 1)),
textColor = tOldLine.textColor .. string_sub( sEmptyTextColor, 1, nNewWidth - (nWidth + 1)),
backgroundColor = tOldLine.backgroundColor .. string_sub( sEmptyBackgroundColor, 1, nNewWidth - (nWidth + 1)),
If they are changed, this is the result:
The same DOES NOT apply to the height, as that is calculated differently from the width.
I really hope this is fixed in the future versions.