Ok, I have successfully integrated the control into my project - woo hoo!
With the code you offered up a couple of posts ago, along with some minor tweaks, I was able to get the autoscrolling functioning as desired - i.e. retaining the positioning and selection when autoscroll is deselected, and automagically autoscrolling when same is selected.
Right now I am using a checkbox control with which to implement this. I am struggling a bit with the math to determine if the vertical scroll button is located at the bottom of the scroll bar, in order to programmatically turn auto-scrolling on and off. That is a battle for another day, however, as the checkbox control is fine, and I may just leave it in there, instead of trying to get cute.
The next step is to take advantage of the feature set that the tool offers.
I have implemented the RE control as a console display, displaying received text from a serially connected device. The device can generate user output from the user application, but also provides firmware messages (i.e. when programming is complete, etc.).
I'd like to differentiate the user app generated dialogue from the firmware generated dialogue via the use of different colors inside of the console (the RE control). i.e.:
Quote:
Resetting...
Going Interactive...
Welcome back to ARMbasic Kernel[7.09] Copyright 2007, Coridium Corp.
Ready...
Flashing ARMmite v2 on COM 3 ... 0.38K code 0.02K data programmed
Resetting...
Going Interactive...
Welcome back to ARMbasic Kernel[7.09] Copyright 2007, Coridium Corp.
Ready...
Executing...
Testing... 5
Testing... 4
Testing... 3
Testing... 2
Testing... 1
BOOM!!!!!!!!
Going Interactive...
Going Interactive...
... Finished in 5036 ms
Resetting...
Going Interactive...
Welcome back to ARMbasic Kernel[7.09] Copyright 2007, Coridium Corp.
Ready...
Historically, I have given the user the ability to clear the control's contents by simply clicking a clear button, in which case, it totally erases the control's contents by setting it to null.
What I am struggling with is the implementation of the colorization of the text.
In reading the RTF specs from various sources, it seems that the control will need to have some embedded (markup) header information, as well as some inline markup for tagging the text in order to be different colors.
Maybe I am over-thinking it.?.
Is this indeed the case, or can I simply blank out the control, and then add arbitrary text, with inline mark-up, in order to get the desired results - on the fly? Or would I be better served to have a template file with which to use to hold the active console content. And inside of this template file is where I would store the (required ?) rtf header/color tables/etc. and periodically update the control's contents by placing my received strings inside of the template file and then pushing the content to the RE control?
I prolly over complicated what I am struggling with, but hopefully someone will be able to ascertain what I am trying to accomplish and offer constructive feedback on how best to accomplish this.
Please review and advise. Thank you!
-t