1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Donation with Paypal!!!

    Go to your paypal account and send directly donation to [email protected]

    1 month - 10 $ - Standart VIP

    6 months - 20 $- Standart VIP

    1 year - 30 $- Standart VIP

    2 years - 50 $- Standart VIP

    Gold member for life - 150 $- Standart VIP

    High Vip (Standart VIP include) group please send PM or email to [email protected] for info

    After Donation please send email to [email protected]

  3. Donation Ways 2020


    Paysend
  4. Telegram
Dismiss Notice

Donation with Paypal!!!

Go to your paypal account and send directly donation to [email protected]

1 month - 10 $ - Standart VIP

6 months - 20 $- Standart VIP

1 year - 30 $- Standart VIP

2 years - 50 $- Standart VIP

Gold member for life - 150 $- Standart VIP

High Vip (Standart VIP include) group please send PM or email to [email protected] for info

After Donation please send email to [email protected]

Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

Delphi XE8 TExpander

Discussion in 'Delphi Help&Requests' started by Tallys, Sep 1, 2015.

  1. Tallys
    Offline

    Tallys DF Junior

    Good Morning!

    I'm using some TExpanders in my software with grids inside. When I start the program, it checks if there is data to be shown, and if there is, I expand the component, failing that, leave it closed.

    What I need now is to check at the time the user attempts to expand the component, if there is data to be displayed. If there is I allow to expand. However there is no event for this purpose. I tried something with the onclick event, but when you click the button TExpander, the event is not fired, apparently it is a separate component. TExpanderButton.

    Someone did something about it or know any solution?

    Thanks in advance!
     
  2. Tallys
    Offline

    Tallys DF Junior

    RE:

    Hello! I found a solution using the OnApplyStyleLookup event!


    Code:
    procedure TF_Main.ExpSchedulerApplyStyleLookup(Sender: TObject);
    var
    Button:TExpanderButton;
    begin
      Button := TExpanderButton(ExpScheduler.FindStyleResource('button'));
      if Assigned(Button) then
      Begin
        Button.OnClick := TExpButton.ExpSchedulerClick;
      End;
    end;

    I created a Class Procedure and linked to OnClick event of the Expander Button.
     
  3. profepaco
    Offline

    profepaco DF Junior

    RE:

    thanks for sharing
     
  4. m00kboy
    Online

    m00kboy DF Junior

    RE:

    thanks
     
  5. mistix
    Offline

    mistix DF Junior

    RE:

    Thanks
     

Share This Page