You are viewing limited content. For full access, please sign in.

Question

Question

Workflow Text Box no fill

asked on April 1, 2014

When I use the Add Text Box activity in WF 9.1.1.365 and select (None) for the Fill Color, the resulting text box has a white background.  i can open the entry and change the background from white to None and it will behave as expected.

 

Did I find a bug?

0 0

Answer

SELECTED ANSWER
replied on April 3, 2014

I ended up opening a case with support.  It is an issue, so an SCR (i don't know for sure what that is) was created and support stated it will be fixed by 9.2.

0 0
replied on April 3, 2014

SCR = "Software Change Request", which is part of our internal jargon for bug reports and enhancement requests.

0 0

Replies

replied on April 3, 2014 Show version history

Hey everybody,

Laserfiche Support did an SCR for my current issue, but I wanted to try to workaround it with a script.  I repurposed a script from the Code Library that iterates through annotations in an entry isolates a particular type and deletes them (like deleting all sticky notes or stamps from an entry).  So I have figured it all out, except for what integer to set for 'no fill' background.  I tried -1, 0, 255, 256, and 'Nothing'.  at best I get black background.  Anyone know what I might can use to indicate 'no fill' for the background in a script?  Script is below: (the line in question is 41)

 

Namespace WorkflowActivity.Scripting.SDKScript
    '''<summary>
    '''Provides one or more methods that can be run when the workflow scripting activity is performed.
    '''</summary>
    Public Class Script1
        Inherits SDKScriptClass90
        '''<summary>
        '''This method is run when the activity is performed.
        '''</summary>
        Protected Overrides Sub Execute()

            ' *** Remove Annotation(s) script starts here. ***

            ' Retrieve the document, lock it, then retrieve the document's annotations (of a specified type).
            Dim Doc As LFDocument = Me.Entry
            Doc.LockObject(Lock_Type.LOCK_TYPE_WRITE)
            Dim AnnListing As ILFAnnotationListing = Doc.GetAllAnnotations(Annotation_Type.ANN_TEXTBOX) ' <-- Change annotation type, if necessary.

            ' Determine if the document has 1+ annotations (of a specified type).
            If AnnListing.RowCount > 0 Then

                ' Get the document's pages and create a LFPage object.
                Dim Pages As LFDocumentPages = Doc.Pages
                Dim Page As LFPage
                ' Create a variable that will determine which page is set to be processed next.
                Dim NextPageToBeProcessed as Integer = 0

                ' Process each row of AnnListing.
                For i As Integer = 1 To AnnListing.RowCount

                    ' Get the annotation's page number.
                    Dim AnnotationPageNumber As Integer = AnnListing.DatumByColType(i, Annotation_Column.ANNOTATION_COLUMN_PAGE_NUM)
                    ' Get the page on which the annotation exists.
                    Page = Pages.Item(AnnotationPageNumber)
                    ' Get the annotation's ID.
                    Dim AnnotationID As Integer = AnnListing.DatumByColType(i, Annotation_Column.ANNOTATION_COLUMN_ITEM_ID)
                    ' Get the annotation.
                    'Dim Ann As ILFAnnotation = Page.GetAnnotationByID(AnnotationID)
                    Dim tb as ILFTextboxAnnotation = Page.GetAnnotationByID(AnnotationID)
                    ' Change its color.
                    tb.FillColor = 256
                    ' Determine if we are processing AnnListing's last row.
                    If i <> AnnListing.RowCount Then

                        ' Determine which page is set to be processed next.
                        NextPageToBeProcessed = AnnListing.DatumByColType(i + 1, Annotation_Column.ANNOTATION_COLUMN_PAGE_NUM)

                        ' Update all changes made to the page if we're done processing it.
                        If NextPageToBeProcessed <> AnnotationPageNumber Then

                            ' Update the page.
                            Page.Update()

                        End If

                    Else

                        ' If we are processing AnnListing's last row, update the page now.
                        Page.Update()

                    End If

                Next

            End If

            ' Unlock the document and release it from memory.
            Doc.Dispose()

            ' *** Remove Annotation(s) script ends here. ***

        End Sub

    End Class
End Namespace

 

1 0
replied on April 4, 2014

After some experimentation, I found my number:  It's 4294967295 (i.e. 0xFFFFFFFF).  Setting ILFTextBoxAnnotation.FillColor = 4294967295 will make the background transparent.  Sweet!

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.