Sample App and External Toolbar

  • Hi,
    I've been learning the basics of TextDyamic over the last few days.

    Yesterday I started creating a primitive version of my end goal. Although it is rudimentary, and certainly not an explample of great coding, if anybody would like a copy I will throw in a few comments and make it available.

    It uses the following basic features of TD:
    1. Setting and retriving content as text or HTML
    2. Checking and altering the bold, italic, font, and underline state of the insertion point.
    3. Setting and retrieving the current selection (as text or HTML)
    4. Zooming in and out.

    I've wrapped multiple TD functions into single properties. So, for example you can use the property SelectionHTML to read or set the current selection as HTML. This really only save you a line or two of code, but it is convienient, and more importantly, it may help you learn the TD interface quicker.

    There is also an external toolbar, which inherits from the standard ToolStrip container. I needed this because multiple copies of TD will be displayed at once, so wasting real estate on having a full sets of toolbars on top of each control just isn't practical. You pass it a TD control and it does the rest.

    As I mentioned, I just really stareted learning the TD interface, I am not an TD experienced user. I'm offering this only as an aid to help new users, like myself, to learn the interface. More examples always helps.

    If anybody would like a copy, let me know and I'll clean it up a bit and post the code...somehow.

  • hmmm.. I guess I might well just post the interface:


    Public Interface fWysiwygViewer
    Event TextFormatChangedEvent(ByVal sender As Object, ByVal e As TextFormatFlagsEventArgs)

    #Region "Property for direct access to the TD Control"
    ReadOnly Property TdEditor() As WPDLLInt
    #End Region

    #Region "Text size,shape"
    Property TextIsBold() As Boolean
    Property TextIsItalic() As Boolean
    Property TextIsUnderline() As Boolean
    Property TextFont() as Font
    #End Region

    #Region "Retrieving/setting text/selection"
    Property SelectionText() As String
    Property SelectionHtml() As String
    Property EntireText() As String
    Property EntireHTML() As String
    #End Region


    #Region "Zooming and page View"
    Sub ZoomIn()
    Sub ZoomOut()
    #End Region
    End Interface