User Interface
Once Visual Studio has been set up and the basis for a GisLink application created, you can begin adding UI features.
Beneath End Property add the following new sub procedure:
Public Sub New(ByVal SISApplication As SisApplication)
APP = SISApplication
' This is the application group in Cadcorp SIS desktop Applications Tab
Dim group As SisRibbonGroup = APP.RibbonGroup
group.Text = "HelloGislink"
' Define a large command button
Dim BigButton As SisRibbonButton = New SisRibbonButton("Big Button")
BigButton.LargeImage = True
BigButton.Help = "Help Text"
BigButton.Description = "Descriptive Text"
' Add the button to the main add-in group
group.Controls.Add(BigButton)
End Sub
This will add a group container to the SIS Applications tab and fill it with a large button called Big Button. If you hover the mouse over the large button Help Text and Descriptive text will appear
Build the solution and start SIS Desktop. The new container and large button should appear in the Applications tab:
Now add a drop down button with the following code. Place this code below group.Controls.Add(BigButton)
Dim DropDownButton As SisRibbonButton = New SisRibbonButton("Drop Down")
DropDownButton.LargeImage = True
Dim ChildButton1 As SisRibbonButton = New SisRibbonButton("Child Button 1")
ChildButton1.LargeImage = True
DropDownButton.SubItems.Add(ChildButton1)
group.Controls.Add(DropDownButton)
Build the solution and check that it is working in SIS Desktop (make sure you check the Applications tab):
Now add a container group for a selection of small buttons, add the following to your Hello World Class (below the code for the drop down menu).
World Class (below the code for the drop down menu).
' A container for a group of small buttons
Dim smallGroup1 As SisRibbonControlGroup = New SisRibbonControlGroup
' Populate the first small button group
Dim SmallButton1 As SisRibbonButton = New SisRibbonButton("My Small Button")
SmallButton1.Help = "Help Text"
SmallButton1.Description = "Descriptive Text"
smallGroup1.Controls.Add(SmallButton1)
Dim SmallButton2 As SisRibbonButton = New SisRibbonButton("My Small Button")
SmallButton2.Help = "Help Text"
SmallButton2.Description = "Descriptive Text"
smallGroup1.Controls.Add(SmallButton2)
Dim SmallButton3 As SisRibbonButton = New SisRibbonButton("My Small Button")
SmallButton3.Help = "Help Text"
SmallButton3.Description = "Descriptive Text"
smallGroup1.Controls.Add(SmallButton3)
' Add the button group to the main add-in group
group.Controls.Add(smallGroup1)
Again save and build the solution and check it is working in SIS.
A basic SIS GisLink User Interface has now been created: