[AccessD] MSAccess HTML Textbox - part three
Stuart McLachlan
stuart at lexacorp.com.pg
Tue Jul 26 02:07:18 CDT 2022
You're lucky this one made it through the size filter.
After it had been passed through the MailMan filter and multiparts were stripped:
X-Content-Filtered-By: Mailman/MimeDel 2.1.34
It was still
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Which means that the content was at least 33% larger than the plain text was before
encoding.
On 26 Jul 2022 at 2:57, John Colby wrote:
> So, assuming moderator intervention... we have a pair of classes.
> clsHTMLFormat processes a single string needing formatting.
> clsHTMLTextBox wraps the text box, providing a collection to store the
> instances of clsHTMLFormat as they are created, initialization stuff
> and a function to create instances of clsHTMLFormat, passing in the
> string and some booleans (mostly) which say "apply xyz formatting
> thing" if true.
>
> The final piece is to discuss setup in the form which holds the text
> box.
>
> Build a form. Insert a text box in it.
>
> Option Compare Database
> Option Explicit
>
> Dim mclsHTMLTestTextBox As clsHTMLTextBox
>
> Private Sub Form_Load()
> Set mclsHTMLTestTextBox = New clsHTMLTextBox 'High level
> licensing
> status
> mclsHTMLTestTextBox.Init Me, txtTest
> mclsHTMLTestTextBox.fWriteRaw "We have test data BOLD.", , True
> mclsHTMLTestTextBox.fWriteRaw "We have test data ITALICS.", , ,
> True mclsHTMLTestTextBox.fWriteRaw "We have test data UNDERLINE.",
> , , , True mclsHTMLTestTextBox.fWriteRaw "We have test data BIG.",
> , , , , 5 mclsHTMLTestTextBox.fWriteRaw "We have test data RED.",
> , , , , , "RED" mclsHTMLTestTextBox.fWriteRaw "We have test data
> ALGERIAN BLUE.", , , ,
> , , , "ALGERIAN", enumVBColors.Blue
> End Sub
>
> The results look like this:
>
> We have test data BOLD.
>
> We have test data ITALICS.
>
> We have test data UNDERLINE.
>
> We have test data BIG.
>
> We have test data RED.
>
> We have test data ALGERIAN BLUE.
>
>
> The takeaway here is that:
> 1) Ya gotta be careful about the formatting of lines in an email
> 2) Classes can actually be useful 3) Classes given away by folks can
> be easy to pull in and use in your own projects
>
> Seriously though, There is a whole lot of "I don't use classes
> because... yada yada no inheritance. Try to implement this
> functionality without classes. We'll talk when you have no hair left.
>
> And finally, in my error handlers I use the following to allow me to
> turn on and off debug.print for a module or for the entire project.
> Put that in a module and it can be called if needed.
>
> Public Sub assDebugPrint(ByVal vstrMsg As String, _
> Optional DebugPrint As Boolean = True, _
> Optional boolStop As Boolean = False)
> #If DebugPrint Then
> If DebugPrint = True Then Debug.Print vstrMsg
> If boolStop Then Stop
> #End If
> End Sub
>
> Feedback welcome.
> --
> John W. Colby
> Colby Consulting
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list