Jump to content

Some more simple components


Recommended Posts

  • Moderators
A couple of more links for people interested in some bare-bones but functional SMS components :

 

1) www.lynkfs.com/components/Carousel/Carousel.pas

An image carousel with choice of effects

Example of use in ..../Carousel/Carousel.sproj

Preview : ..../Carousel/www/index.html 

 

2) www.lynkfs.com/components/PageControl/PageControl.pas

A tabbed page component.


Example of use in ..../PageControl/PageControl.sproj

Preview : ..../PageControl/www/index.html 



 


3) www.lynkfs.com/components/PopUpMenu/PopUpMenu.pas

A simple pop-up menu

Example of use of this component in ..../PopUpMenu/PopUpMenu.sproj

Preview : ..../PopUpMenu/www/index.html

 

4) www.lynkfs.com/components/TreeView/TreeView.pas

A treeview


Example of use in ..../TreeView/TreeView.sproj

Preview : ..../TreeView/www/index.html




 

Link to post
Share on other sites
  • 11 months later...
  • Moderators

One way would be something like this :

procedure TPopUpMenu.InitializeObject;
...
  Handle.ReadyExecute( procedure ()
    begin
        asm
          document.addEventListener("click", function() {
            alert('clicked '+ event.clientX + ' ' + event.clientY);
            });
        end;
    end);
 
or better in smart pascal :
 

procedure TPopUpMenu.InitializeObject;
...
  Handle.ReadyExecute( lambda
      browserapi.document.addEventListener("click", lambda showmessage(browserapi.event.clientX) end);
    end);

and check if the click position (clientX, clientY) falls within the component visuals

Link to post
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...