html control as an output window
-
I'm using an html control in my Smartphone2002 application as an output window (so html formatted text is continually being written to it) My problem is that the control sometimes seems to wait for 3 or 4 lines to be "written" before updating it (which isn't much use when I want a real time update) Is there something I need to do to force the control to always refresh as soon as I add the text? -- Help me! I'm turning into a grapefruit!
-
I'm using an html control in my Smartphone2002 application as an output window (so html formatted text is continually being written to it) My problem is that the control sometimes seems to wait for 3 or 4 lines to be "written" before updating it (which isn't much use when I want a real time update) Is there something I need to do to force the control to always refresh as soon as I add the text? -- Help me! I'm turning into a grapefruit!
You have to send a
DTM_ENDOFSOURCE
message to make sure that the text is complete. I think that you are depending upon a lateral behaviour of the control that is partially rendering your text. You have no control on its internal buffers and how they are flushed. So I think there is no "nice" solution to this problem. -
You have to send a
DTM_ENDOFSOURCE
message to make sure that the text is complete. I think that you are depending upon a lateral behaviour of the control that is partially rendering your text. You have no control on its internal buffers and how they are flushed. So I think there is no "nice" solution to this problem.Hmm, that was what I was suspecting. Sadly I need to be able to continually update the text while the app is running. Sending the ENDOFSOURCE message means that the control no longer accepts any more input :( -- Help me! I'm turning into a grapefruit!
-
Hmm, that was what I was suspecting. Sadly I need to be able to continually update the text while the app is running. Sending the ENDOFSOURCE message means that the control no longer accepts any more input :( -- Help me! I'm turning into a grapefruit!
benjymous wrote: Sending the ENDOFSOURCE message means that the control no longer accepts any more input Maybe you can work around it. Here is an idea: Set up a buffer where you will add the HTML text. Whenever you have a new text insertion, append it to your buffer, flush the control, and set its contents from the buffer. Maybe you can even try and control the vertical scrollbar, so that the lastest text is always displayed. If you want to avoid flickers, try
SetRedraw
. -
benjymous wrote: Sending the ENDOFSOURCE message means that the control no longer accepts any more input Maybe you can work around it. Here is an idea: Set up a buffer where you will add the HTML text. Whenever you have a new text insertion, append it to your buffer, flush the control, and set its contents from the buffer. Maybe you can even try and control the vertical scrollbar, so that the lastest text is always displayed. If you want to avoid flickers, try
SetRedraw
.Yeah, I think that's what I'm going to have to do. There's an option to jump to a specific anchor, so I'll just write my buffer, followed by an anchor line to the control each time, then jump to that -- Help me! I'm turning into a grapefruit!