RadioButtons checked status not updating on invisible form

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #51630
    CheshireCat
    Participant

      Hello Darren,

      if you make Form2 invisible, RadioButtons should have no focus!

      Code:
      procedure TForm2.FormHide(Sender: TObject);
      begin
      ActiveControl := nil;
      end;

      I don't know it's an error, but I observe this behavior since I use delphi …

      #51634
      DarrenB
      Participant

        Good morning Sascha, I hope u r well 🙂

        Thanks for your reply… I did not know what you said! I have inserted an

        ActiveControl := nil;

        In all the relevant positions in my main application and the advice you offered seems to be perfect. Certainly the error I was having last night is now fixed 🙂

        Thankyou 😀

        Darren

        #51635
        CheshireCat
        Participant
          'DarrenB' wrote:

          I did not know what you said!

          Sorry for my bad english :blush:

          #51636
          DarrenB
          Participant
            'CheshireCat' wrote:

            Sorry for my bad english :blush:

            lol Sascha nooooo your english was perfectly understandable… I just meant I did not know that I should put the ActiveControl:=nil into the form hide event!!!!

            In this case, my English was bad!!!! lol 😉

            #51637
            CheshireCat
            Participant

              Ok Darren, that calms me 🙄

              'DarrenB' wrote:

              I just meant I did not know that I should put the ActiveControl:=nil into the form hide event!!!!

              What I meant to say:

              Radio buttons are activated when gets the focus. If the active control is a radio button when the form changes from hidden to visible, Windows sends a SetFocus message and the button is activated. This is not a Alpha Controls bug but a questionable behavior of Windows.

              #51638
              DarrenB
              Participant

                Useful to know, thanks Sascha 🙂

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