Edzard Egberts
2013-04-04 09:39:19 UTC
I tried to show some html-text for help, but Fl_Helpview doesn't take
care of <br> and mucks up formatting. Doc tells, Fl_Helpview should take
care of <br>, shouldn't it?
Is there a way to get linefeeds, as aspired in the following example. My
system shows no distance between the two lines:
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Help_View.H>
const char* cHTML=
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
"<html>"
"<head>"
"<meta http-equiv=\"content-type\" content=\"text/html;
charset=ISO-8859-1\">"
"</head>"
"<body>"
"First Line<br>"
"<br>"
"<br>"
"Second Line after 3 times <br><br>"
"<br>"
"</body>"
"</html>";
int main()
{
Fl_Double_Window Win(400, 200, "Helpview");
Fl_Help_View* pHV= new Fl_Help_View(10, 10, 380, 180, "");
Win.end();
pHV->value(cHTML);
Win.show();
return Fl::run();
}
care of <br> and mucks up formatting. Doc tells, Fl_Helpview should take
care of <br>, shouldn't it?
Is there a way to get linefeeds, as aspired in the following example. My
system shows no distance between the two lines:
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Help_View.H>
const char* cHTML=
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
"<html>"
"<head>"
"<meta http-equiv=\"content-type\" content=\"text/html;
charset=ISO-8859-1\">"
"</head>"
"<body>"
"First Line<br>"
"<br>"
"<br>"
"Second Line after 3 times <br><br>"
"<br>"
"</body>"
"</html>";
int main()
{
Fl_Double_Window Win(400, 200, "Helpview");
Fl_Help_View* pHV= new Fl_Help_View(10, 10, 380, 180, "");
Win.end();
pHV->value(cHTML);
Win.show();
return Fl::run();
}