No announcement yet.

Accessing VTW Components properties

  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing VTW Components properties

    Hello and thanks

    Does anyone know how to access vtw components properties from a script, for example Items from a drop down, or any other of its properties.
    if posible a sample or samples scripts would be great or tutorials related to this topic.
    I have searched for vbscript tutorials but they don’t apply to the components on a template thats why im asking for help here
    again thanks

  • #2
    Hey Matzunga,

    Template Wizard is very similar to Visual Studio in the sense that you can access all the properties of the component by typing its Name (assigned by you) then the "." <-dot operator and then the property name. Template wizard will help you a little bit by showing a pop up menu after you type the component name followed by DOT "." ....

    So for example, Add a combo box, click on it, go to the NAME field.. Change the name to "MyComboBox". Add your items.
    Now if you want to grab the items you can simply declare a new array and set it equal to the MyComboBox.Items.


    Dim myArr

    myArr = MyComboBox.Items

    'To Display item 3 in a textbox named MyTextBox.
    MyTextBox.Text = myArr(2) OR MyComboBox.Items(2)

    Attached Files


    • #3
      Active Forum user
      Novacane89 Thank you for the response, I will give your samples a try, I am just trying to get better at the scripting part of vtw.


      • #4
        I think one can use FindComponent(TextBox1).Text="" to aceess the property of the object in the template wizard
        a sample code to set the maxlength to 25 of the 10 textfield in the form.

        sub InitForm
        dim i
        for i = 1 to 10
        FindComponent("INFO_TEXT_" & i).maxlength = 25
        end sub


        • #5
          Forum user
          rajesh.sisodia Thank you for the response, I will be trying this, examples like this are what I need to improve on my scripting skills, thank you