How do I close popup of TsDateEdit

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #49775
    Support
    Keymaster

      Hello!

      This code can help you to close a popup calendar :

      Code:
      if sDateEdit1.FPopupWindow nil then TForm(sDateEdit1.FPopupWindow).Close;

      I will research a described strange behaviour (I can reproduce it) and I'll fix it soon. 🙂

      #49776
      DarrenB
      Participant

        Thankyou…as long as I know you can reproduce it I know you will fix it!

        Your temporary code fix did work in removing the popup in the situation I described, however when 'coming back' to the form (making it visible again) and clicking on the DateEdit icon again, I get an Access Violation. In any case this isn't a biggie right now will wait a fix 🙂

        I did this

        if assigned(form2.sDateEdit1.FPopupWindow) then

        FreeAndNil(form2.sDateEdit1.FPopupWindow);

        in the form hide…don't know if the check for assigned is necessary.

        Happy New Year (a bit late, but still 🙂 )

        #49777
        Support
        Keymaster
          'DarrenB' wrote:
          I did this

          if assigned(form2.sDateEdit1.FPopupWindow) then

          FreeAndNil(form2.sDateEdit1.FPopupWindow);

          Try this :

          if sDateEdit1.FPopupWindow nil then TForm(sDateEdit1.FPopupWindow).Close;

          Quote:
          Happy New Year (a bit late, but still 🙂 )

          Thanks 🙂

          #49778
          DarrenB
          Participant
            'Support' wrote:

            Try this :

            if sDateEdit1.FPopupWindow nil then TForm(sDateEdit1.FPopupWindow).Close;

            Perfect, thanks 🙂

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.