News bug?

Hey,

I do not know why, but i can not get the news label at the main menu to work.

I can write 1 line into the news.txt, but if i switch to a second line and write something, it does not show up. I already enlarged the lblNews, but it does not show up. When i paste the second line right behind the 1. sentence in the first line, it does show up. So there seems to be a bug or something like that.

how to fix it?

thanks in advance

It should be 1 long line of text for it to be read.

Just write all in 1 line
ex.
[WRONG]
1.Hello this is an test.
2.haha hihi hohoh.
[CORRECT]
1.Hello this is an test. haha hihi hoho

also if you want breaks in the news section type inbefore the next sentence you want to break off

I am not sure it will work. Isn’t that for HTML?

You should be using \r\n for linebreaks. It’s the standard windows format for them. (There’s several other useful ones, such as \t which will indent the next text to a tabstop.)

Thanks,
Aero/EBrown

@Abhi2011:

I am not sure it will work. Isn’t that for HTML?

The client replaces that with a newline.

@-Aero-:

You should be using \r\n for linebreaks. It’s the standard windows format for them. (There’s several other useful ones, such as \t which will indent the next text to a tabstop.)

Thanks,
Aero/EBrown

Not in Visual Basic 6 / Eclipse’s parser.
makes a new-line for Eclipse in the news, as others have mentioned before.

@Soul:

Not in Visual Basic 6 / Eclipse’s parser.
makes a new-line for Eclipse in the news, as others have mentioned before.

Oh lovely. I assume it supports full HTML then. If not, what’s the point? Why support a single tag but not support native commands?

Thanks,
Aero/EBrown

@-Aero-:

Oh lovely. I assume it supports full HTML then. If not, what’s the point? Why support a single tag but not support native commands?

Thanks,
Aero/EBrown

We needed a method to make newlines work in the news. Robin chose to use the
tag. VB6 labels don’t support bolding midway through the text / italics / HTML / what say you, so trying to support even a subset of HTML would be an exercise in futility. Unless you want to use a Rich Text Box, in which case you might as well make it news.rtf instead, or just use an HTML frame, which presumes a webserver (or that the user knows how to write HTML) and is also quite ugly.

As for not supporting \r\n, I don’t know. But if we supported \r\n, we would have to support \r (alone, which moves the cursor back to the start of the line), \t, \v, ", \, all unicode character escapes, hex character escapes, et cetera. There is no reasonable way to implant all of one standard, especially when we needed only newlines.

So overall, I think using
is a silly idea now, although it probably seemed like a good idea at the time. But it’s already in the source code now, and the alternatives don’t seem much better for a simple news screen.

@Soul:

We needed a method to make newlines work in the news. Robin chose to use the
tag. VB6 labels don’t support bolding midway through the text / italics / HTML / what say you, so trying to support even a subset of HTML would be an exercise in futility. Unless you want to use a Rich Text Box, in which case you might as well make it news.rtf instead, or just use an HTML frame, which presumes a webserver (or that the user knows how to write HTML) and is also quite ugly.

As for not supporting \r\n, I don’t know. But if we supported \r\n, we would have to support \r (alone, which moves the cursor back to the start of the line), \t, \v, ", \, all unicode character escapes, hex character escapes, et cetera. There is no reasonable way to implant all of one standard, especially when we needed only newlines.

So overall, I think using
is a silly idea now, although it probably seemed like a good idea at the time. But it’s already in the source code now, and the alternatives don’t seem much better for a simple news screen.

If it’s a default windows control, it should already have support for all the unicode escape characters. Of course, I have no idea about VB6, because Microsoft may have not put all that support in it by default. I know even the most basic of controls in .NET have support for them all, so I assume VB6 should too.

Thanks,
Aero/EBrown

@-Aero-:

If it’s a default windows control, it should already have support for all the unicode escape characters. Of course, I have no idea about VB6, because Microsoft may have not put all that support in it by default. I know even the most basic of controls in .NET have support for them all, so I assume VB6 should too.

Thanks,
Aero/EBrown

Unicode just an idea at the time of VB6, and your standard \r\n is replaced by the global variable vbNewLine. Any ASCII characters are retrieved through the Chr$ function, not escape sequences.

Log in to reply