Ok, I'm trying to make a chat box in a game I'm writing. It works very nicely except for a couple "problems."
So you know, the chat box is a combo box in a dialog (if you didn't read the subject
1) Vertical scrolling. I'm adding lines to the end of the previous text in the combo box. What happens is that when the text causes vertical scrolling, the bottom line of text isn't visible because the scollbar is at the top. I've done did -c $dname ID $did($dname,ID).lines
, and that's okay, but I don't like it highlighted, and if I try to use -u afterwards, it doesn't seem to want to work. Also, as soon as you start typing again, it scrolls back up to the top. The question is, whether or not it is possible to directly control the scroll bar and make it "stick" to the bottom unless moved by a person? Or, would it be better to just use an edit box and a list box?
2) Wrapping text. Because I can't just wrap text with a command switch in a combo box, I have it splitting the line and wrapping that way. So far, so good. The issue isn't even really a problem, but an issue with making it better... I figured out that the largest width letter will fit 70 letters (plus the <nick> before the text) across the combo box. So, I am splitting the text at the 70 length. (I'll probably make it split by words using that as maximum length at a later point). Anyhow, because the letters are different widths, the line can take up anywhere from half the width of the box up to the entire width ("i" vs "X"). Now, most normal sentences I have tried do take up about 80% width, but is there some way to determine if the text line hits the border of a combo box rather than counting letters? Again, this isn't a big issue, just an issue with making it look nice.