Graphics

 View Only
  • 1.  visual logic editor

    Posted 16 days ago

    How to convert postive number into negative number in xpression designer ???..

    like :: 


    I want to  convert 20 value into negative in visual Logic editor. i.e -20
    ------------------------------
    NewBin
    Designer
    ------------------------------



  • 2.  RE: visual logic editor

    Ross Staff
    Posted 16 days ago
    The same way you usually do in maths, multiply that number by -1.  but it requires a hidden text box as you'll need 2 textboxes to avoid conflicts. 


    Or to avoid needing 2 text boxes you could place this script "ononline"
    dim text as xpTextObject

    self.GetObjectByName("Text1", text)

    text.Text = cint(text.Text * -1)




    Or you can simply add a "-" to the string this way if you prefer. 


    Or again to avoid two text boxes you could place this script "ononline"
    dim text as xpTextObject

    self.GetObjectByName("Text1", text)

    text.Text = ("-" & text.Text)





    Or if the value is coming from datalinq you can preappend with a "-" in the settings.



    ------------------------------
    Simon Redmile
    Test Pilot | Senior Graphic Programmer & Designer
    Ross Video
    London United Kingdom
    ------------------------------