Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

News bug?


Dawntide
 Share

Recommended Posts

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
Link to comment
Share on other sites

@-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.
Link to comment
Share on other sites

@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
Link to comment
Share on other sites

@-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.
Link to comment
Share on other sites

@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
Link to comment
Share on other sites

@-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.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...