No announcement yet.

Can we use the inbuilt overlays?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Can we use the inbuilt overlays?

    Can you use the inbuilt overlays in your DigitalMod?

    I want to have a screen where the user enters a name.
    I would like to use the CKeyPadLettersOverlay in my application and tie the events to my textbox.

    Is this do-a-ble or do I need to make my own keyboard?
    I cannot find anywhere in the API where I can get a refrence to it. If I attempt to make an overlay with the same name then I get the good old “Object reference not set to an instance of an object“

    Please help.

  • #2
    nope. You have to make your own.
    If your doing the module as a .net addin, I have a .net control that handles it for you.


    • #3
      Yes i am.

      can yoou please send it to me?


      • #4

        in your addon, create an overlay, then you pass the overlay to the keypad object... like below.

        Private overLayKeyPad As StreetDeck.ScriptOverlay
        Private KeyPad As StreetDeck.SDKeyPad

        overLayKeyPad = app.CreateOverlay("FillUpKeyPadOverLay")

        KeyPad = New StreetDeck.SDKeyPad("FillUpKeyPad", overLayKeyPad, 530, 50)

        AddHandler KeyPad.KeyClicked, AddressOf keyclicked

        it only returns 1 event (keyclicked). each time a key is clicked, the event is raised. The event returns the entire text string, not just the single character that was clicked, so there is no need to concatenate the values...just set the display object = the returned value. It should look something like this...
        Sub keyclicked(ByVal CurrentText As String)
        EditingTextBox.Value = CurrentText
        End Sub

        you can also specify keyboard or numpad views
        and enable/disable either view
        KeyPad.AllowKeys = False
        keypad.allownums = false


        • #5

          Looks neet and tight too.



          • #6
            How do i make a textbox?

            I see the enum GeoShapeType.geoTextBox
            But dont see how to make it. Am I still making a panel or is it something else?


            • #7

              i made that one also. it's not complete but it is functional

              create a module or an overlay, then add the control

              txtOdometer = New StreetDeck.SDTextBox("txtboxname", parentoverlay, 50, 10)
              txtOdometer.Caption = "Odometer"
              txtOdometer.Value = "0"
              txtOdometer.descrption = "test description"

              that dll also has a combo box control. works mstly the same as the textbox

              cboDistanceUnits = New StreetDeck.SDComboBox("cboDistanceUnits", SettingsOveraly, 250, 260)
              cboDistanceUnits.Caption = "Distance Units"

              there are screenshots of both in this thread


              • #8
                Thanks again.
                Pitty SD doesnt expose these to developers. They have them already anyway.
                Dont like making things like that because they can change then it will not look the same as the rest of the application.


                • #9
                  yea, I spent days trying to figure out how to use the combo boxes that SD uses in the config screens. c'mon guys... just expose all of the controls.

                  These should continue to look fine, they use button class images, so if you reskin, they should match.