Sticky Note functionality

Discussions about annotation support.
Post Reply
rgoodson40
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Sticky Note functionality

Post by rgoodson40 » Sun Feb 05, 2012 11:28 pm

Hello,

Here's another one. I want my users to be able to put sticky notes on a document. Since having pre-defined text in the sticky note doesn't really make sense, the way I am currently doing it is setting the "Text" parameter to "String.Empty", so when they draw the sticky note the text is empty. The way it should work is they draw the note and then can type the text they want in the note. Currently though, the user has to draw the note and then double-click in the note area to be able to type the text for the note.

Is there a way to set it up so that as soon as the user finishes drawing the note, the cursor automatically goes into the note area so that they can immediately start typing. Alot of my users would probably not know that they need to double-click in the note area in order to be able to type the text. Do you know of a way to prevent them from having to do that?

Thanks,
Reagan

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Sticky Note functionality

Post by Loïc » Mon Feb 06, 2012 1:30 pm

Hello Reagan,

This is not yet possible but it will be in the next minor release by using the DisplayTextEditBox() method.

IE:

Code: Select all

Private Sub GdViewer1_AnnotationAddedByUser(ByVal AnnotationIdx As Integer) Handles GdViewer1.AnnotationAddedByUser
    GdViewer1.DisplayTextEditBox(AnnotationIdx)
End Sub
Kind regards,

Loïc

rgoodson40
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Re: Sticky Note functionality

Post by rgoodson40 » Mon Feb 06, 2012 11:33 pm

Sounds good. Thank you.

By the way, currently when the user draws the note, the default fill color of the note is a bright yellow color. Is it possible for me to change that color? I don't need the user to be able to change it, I just want to change it permanently to a lighter yellow color. Is this possible?

Reagan

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Sticky Note functionality

Post by Loïc » Tue Feb 07, 2012 2:36 pm

Hello,

Yes is is:

Code: Select all

 Private Sub GdViewer1_AnnotationAddedByUser(ByVal AnnotationIdx As Integer) Handles GdViewer1.AnnotationAddedByUser
        Dim annot As GdPicture.Annotation = GdViewer1.GetAnnotationFromIdx(AnnotationIdx)
        If TypeOf annot Is AnnotationStickyNote Then
            DirectCast(annot, AnnotationStickyNote).FillColor = Color.Beige
        End If
End Sub
Hope this helps !

Kind regards,

Loïc

rgoodson40
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Re: Sticky Note functionality

Post by rgoodson40 » Tue Feb 07, 2012 11:44 pm

Loic,

Thanks for the reply. That does work, however it draws the note in the bright yellow and then changes it to my new color after its drawn. Is there any way that I can change the default note color so that it draws in the new color instead of changing the color after it is drawn?

Thanks,
Reagan

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Sticky Note functionality

Post by Loïc » Wed Feb 08, 2012 1:24 pm

I was expecting this remark :)

So I've added a new event: BeforeAnnotationAddedByUser()

This will help you to do the trick.

The next release will be published within few hours.

Kind regards,

Loïc

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Sticky Note functionality

Post by Loïc » Wed Feb 08, 2012 3:37 pm

Hello,

New version available: https://www.gdpicture.com/download/downl ... urenet.php

Kind regards,

Loïc

rgoodson40
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Re: Sticky Note functionality

Post by rgoodson40 » Wed Feb 08, 2012 11:46 pm

Thank you Loic. I'm amazed at how quickly you are able to get a new release out. That solution works great for changing the color of a sticky note before it's drawn and it also included the new method "DisplayTextEditBox" so my user doesn't have to double-click on the sticky note to be able to type in it.

I am very impressed so with this tool and especially your support.

Thanks,
Reagan

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Sticky Note functionality

Post by Loïc » Thu Feb 09, 2012 12:04 pm

You are welcome Reagan, thank you for the return !

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests