Using the RE Controls – Part 1

There are a lot of controls that The Raiser’s Edge uses and that you can use in your code to give it a similar look and feel. This article is an introduction to using one of these controls – the SuperEdit70Ex. Like most of the API this is not documented. Indeed this really is not documented. There is no extra documentation other than by looking at the object browser.

 To add the SuperEdit70Ex to a form it must firstly be added to your toolbox. Right click on the toolbox and select Additional Controls (in VBA) or Controls (in VB6). Look down the list for the SuperEdit70Ex and select it as shown below (in the VBA environment):

Additional Controls

Note that these components will only work in the VB6 or VBA environment. They are not supported by .NET (but then .NET has many more replacement components that work much better).

Once you have added the SuperEdit70Ex component you can add it to your form. This component is used in RE for looking up records (constituents, funds, etc) but also for showing the calculator (for number fields), showing the calendar (for date fields) and other purposes. The property that determines which type the control is the style. This can be one of: ellipse, binoculars (default value), calculator, calendar, dropdown, magnifying glass, and a lot more that are not used as widely in RE. You can also have a secondary button style (property secondary style) but the show secondary button property needs to be set. A few examples are shown below:

Sample Form

Unfortunately just because the icon is there does not mean that it does anything. Pressing the button (whichever button it is) will raise the ButtonClick event. From within this event you can show the record look up screen using standard API functionality.

To show the calendar however requires some more work.

If you want to supply a value on startup then you can capture the InitCalendarProps event. This allows you to set the year, month and day values. To update the calendar text box after a user has selected a date then you have to capture the CalendarCloseUp event. The example below shows how this is done.

Private Sub dtNLPostDate_CalendarCloseUp(ByVal UserCanceled As Boolean, ByVal YearValue As Long, ByVal MonthValue As Long, ByVal DayValue As Long) 

   If Not UserCanceled Then 

      dtNLPostDate.Text = DayValue & "/" & MonthValue & "/" & YearValue 

   End If 

End SubPrivate Sub dtNLPostDate_InitCalendarProps(UseTodaysDate As Boolean, YearValue As Long, MonthValue As Long, DayValue As Long) 

  Dim asDate() As String 

  If dtNLPostDate.Text <> "" Then 

     asDate = Split(dtNLPostDate.Text, "/") 

     YearValue = asDate(2) 

     MonthValue = asDate(1) 

     DayValue = asDate(0) 

     UseTodaysDate = False 

  Else 

     UseTodaysDate = True 

  End If 

End Sub

The code above initialises the calendar with the value that appears in the text box. Note that the calendar dropdown and the text box are independent of each other. that is why we have to populate the text box when the calendar close up event is raised.

Watch this space for more information on the controls. If you have used any of the controls then feel free to add a comment or drop me a line if you want to write an article on any of them (or anything else for that matter)

3 thoughts on “Using the RE Controls – Part 1

  1. Dear David,

    We are looking for a new database for our organisation and Raiser’s Edge is one of the possible choices.Could you tell me please a few words about this product.It looks from your website that you know it inside out better then anyone else (including BB technical support).

    Thank you very much and have a nice day!
    Sincerely
    Lana

  2. Lana,

    There is much to be said and I can surely tell you a lot about Raiser’s Edge as a product and Blackbaud’s API but it is probably too much for a posting in this blog! If you come to my other site you can find my contact details (http://www.zeidman.info/contact.htm). Drop me a line with some more specifics and I would be happy to go into some more depth.

    David

Comments are closed.