Jump to content

Small animation of forms on show


d.bernaert

Recommended Posts

4 minutes ago, Sherzod said:

Do you mean ShowAnimation?

 

1 hour ago, PS1 said:

But it slides from right to left. In my application it is very confusing. I want to make it so it will slide from left to right.

 

function window.beforeInit(sender, config)
{
    config.showAnimation = {
        type: 'slideIn',
        direction: 'right',
        duration: 1000,
    };
}

 

Link to comment
Share on other sites

No, it's hide animation.

But i know that it's not working with freeOnClose:=true .

I plan to execute  ,,my own hide animation" before i execute modalResult := mrOk.  So it for example slide out of screen and then it will be freed

Link to comment
Share on other sites

@PS1

Can you try this approach?

1. frmPopup.ClientEvents.UniEvents ->

function window.beforeInit(sender, config)
{
    config.showAnimation = {
        type: 'slideIn',
        direction: 'right',
        duration: 1000,
    };
    
    config.hideAnimation = {
        type: 'slideOut',
        direction: 'right',
        duration: 1000,
        listeners: {
            animationend: function(evt, obj) {
                ajaxRequest(sender, '_close', {})
            }
        }
    };
}

2. 

procedure TfrmPopup.UnimButton1Click(Sender: TObject);
begin
  //modalResult := mrOk;
  Self.Hide;
end;

3. 

procedure TfrmPopup.UnimFormAjaxEvent(Sender: TComponent; EventName: string;
  Params: TUniStrings);
begin
  if EventName = '_close' then
    ModalResult := mrOk

end;

 

  • Like 1
Link to comment
Share on other sites

That really does not make sense. We all contribute to the forum to support each other and the product. What motivates anyone to go through the trouble of looking up and purging all of one’s input. I find this baffling and it seems mean-spirited.

Link to comment
Share on other sites

If you wake up one day, and suddenly conclude that coding is the work of the devil, you may want to delete all of your contributions.

There may be a million more reasons to turn away from coding, so who knows the motivation - or lack thereof.

Some may be addicted to coding, and would do better staying away from it. Especially if it ruins their health.

Or what if your IQ doubles overnight, and you are suddenly ashamed of your old code, which now looks terrible.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...