HtmlPanel - rich text on the device

corwin42

Expert
Licensed User
Longtime User
The <li> </li> tags don't support wrapping to a new line so if you have long list items they are cut off.

Can you fix this in a future release?

Thanks
 

agraham

Expert
Licensed User
Longtime User
That behaviour is by design as I ducked the complexity of trying to make a wrapped list item look OK by suitably indenting it. I code for fun and HtmlPanel nearly ran away into being a chore to complete owing to its' internal complexity so I don't think I will be doing any changes to it except bug fixes (if any are found).
 

Shining

Member
Licensed User
Longtime User
How to refresh the htmlpanel

Hello,
I load an external html file into the panel. This works great. However when I want to load another html file into that panel, the previous one, is still visible.
Maybe a stupid question, but how can I refresh the control with another htmlfile ? (based on the users choice)

here is the code:
Public Sub showInfo(p_kaartnummer)
frmInfo.Show
frmInfo.Text = sTitel(p_kaartnummer)
html = AppPath & "\" & p_kaartnummer & ".html"

HtmlPanel.New1("frmInfo", 0, 0,frminfo.Width,frminfo.Height)
Htmlpanel.ChangeColor("color1",cYellow)
Htmlpanel.ChangeColor("color2",cWhite)
HtmlPanel.ButtonColor = cGray
HtmlPanel.BackColor = cBlack
HtmlPanel.LinkColor = cPurple
HtmlPanel.ScrollBarWidth = 10
HtmlPanel.RenderWidth = 210
HtmlPanel.RenderLeftMargin = 0
HtmlPanel.RenderRightMargin = 0
HtmlPanel.ShowHtmlFile(html)
End Sub
 

Shining

Member
Licensed User
Longtime User
Refresh

Hi,
Thanks, it works :)
So it's best to initialize the objects only once in app_start ?
I wanted to have the code related to the information form in one module. So also the initiation of the object. That way I don't have to write the module name every time I reference it and it places the modules as building blocks apart. (I'm just starting to learn basic4ppc)
 

klaus

Expert
Licensed User
Longtime User
You are not obliged to initialize everything in the AppStart routine.

Two possibilities:
- define in the module a Public Init routine where you initialize what is needed, this routine could be called once from AppStart.

- in the module, declare a global variable Init=0, and in the routine add
If Init = 0 Then
HtmlPanel.New1("frmInfo", 0, 0,frminfo.Width,frminfo.Height)
Init = 1
End If

Best regards.
 

drlebey

New Member
Licensed User
Longtime User
HTML Panel Demo Code

Can someone please give me some demo code of HTML Panel being used in an application.
 

corwin42

Expert
Licensed User
Longtime User
Can someone please give me some demo code of HTML Panel being used in an application.

:confused:

Just download the Library from post #1. There is a demo included.
 

sitajony

Active Member
Licensed User
This lib is great, I need the same thing for My App, I want that when I click on a link I use HTTP.dll, with a WebBrowser when we get the HTML content from a webserver and we show on the WebBrowser it return "Navigation Canceled" just before the HTML content...
Here we can control links with # so it could be better but is it possible to get the source code or tell me how do it? Thanks :)
 

sitajony

Active Member
Licensed User
I meant that before I used a WebBrowser control for get the link clicked with the Navigating event but with HTML Panel we can get the link without show "Navigation canceled" coz I don't want show a page and on a WebBrowser when we click on a link it show a page but not with HTMLPanel and I would know if it's possible to know the code source? I've too library on my project folder...
 

sitajony

Active Member
Licensed User
On my device, the WebBrowser control have a lot of problem, sometime it close my program so I get the source code from HTTP request and who the content html with DocumentText propriete, it works when I change just the documentText but automaticly when we click on a link on the webbrowser it search the webpage so I must stop the searching so when I get the html content it show "Canceled page" and show the web page geted from HTTP but with a HTML Panel it doesn't search when we click on a link so I've just to type the web adresse after # and it should be ok...
I'm using too dll library, so it could be better if I merge the source code directly in the executable... So is it possible to get the code source?
 

Byak@

Active Member
Licensed User
hello andrew, can you add a new function?
i'm say about simple "space" method.
for example "<xspace>40</xspace>" where "40" mean 40pixels at vertical.
"<yspace>40</yspace>" where "40" mean 40pixels at horizontal.
 
Top