Announcement

Collapse
No announcement yet.

Smart Slider - Slide to unlock - set frame problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Smart Slider - Slide to unlock - set frame problem

    Hi,

    played arround with slide to unlock sample app note 4DLS-AN-00050S_R_1_0.pdf.
    Make litte modifications like button0 on form0 switch to form1 and smartslider0 on form1 switch back to form0.
    Code in magicevent0 works fine.
    Adding button1 on form0 without any function causes that smartslider0 doesn't slide back to frame0 after sliding.
    The "WriteObject(tSmartSlider, iSmartSlider0, 0) ;" command doesn' work anymore.

    Have no idea why. Modify code in magicevent0?


    Best Regards
    Doms

  • #2
    Hi Doms, welcome to the forum.

    Can you provide me the code your working with in order for me to debug it?

    Best regards,

    - Vince -

    Comment


    • #3
      Hi Vince,

      thank you for your support.


      func MagicEvent0(var newval)
      var frame;

      frame := img_GetWord(hndl, iSmartSlider1, IMAGE_INDEX);

      if (img_GetWord(hndl, iSmartSlider1, IMAGE_INDEX) >= 40)
      ActivateForm(0) ;
      endif

      WriteObject(tSmartSlider, iSmartSlider1, 0) ;
      endfunc


      BR
      Doms

      Comment


      • #4
        Hi again Doms,

        To fix the error, kindly change the iSmartSlider1 parameter in WriteObject(tSmartSlider, iSmartSlider1, 0) function to the index of the SmartSlider.

        To know the index of the SmartSlider, go to its property and find the index number as shown in the image.

        Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	3.1 KB
ID:	63429 ​​​​​​​

        In this case, the changed command would be WriteObject(tSmartSlider, 0 ,0 ).

        Hope this helps.

        Best regards,

        Vince

        Comment


        • #5
          Sorry Vince, forgot to write....
          SmartSlider index is 1 because i removed my first try SmartSlider0.

          It works as long as i add a button or slider in form0.


          BR
          Axel

          Comment


          • #6
            After changing command to "WriteObject(tSmartSlider, 1, 0) ;" it works fine.

            Thank you for your support

            Comment


            • #7
              No worries Doms.
              You can always contact us if you needed support.

              Best regards,
              Vince

              Comment

              Working...
              X