No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Smart Client - How to capture event window closeButton

    Hi, i have this windows:

    var windows = Window.create({
    ID: "panelTest",
    title: "<span style='font-family: Verdana, Tahoma, sans-serif !important; font-size: 3.3rem !important; color: white !important; font-style: italic;'>Panel Test</span><br /><br />",
    isModal: false,
    showModalMask: false,
    height: 735,
    width: 1300,
    showMaximizeButton: true,
    showMinimizeButton: true,
    showHeaderIcon: false,
    showFooter: false,
    showResizeBar: true,
    headerControls: [
    "headerLabel", tim, "minimizeButton", "maximizeButton", "closeButton"
    //members: [
    // contenitoreTab, hLayoutButtonTab

    How to capture event "closeButton" ?


    See Window.closeClick(). Note the SmartClient Reference is searchable, and a search like "window close" would go right to the appropriate docs - very handy.


      Thanks for reply

      I found this but the tiles are a customButton while closeButton is in the SmartClient library

      In this case it is sufficient to put the action in the click function

      isc.defineClass("CustomImgButton", "ImgButton").addProperties(
      click:function () {
      isc.say("Control " + this.src + " clicked");
      return false;

      var close = isc.CustomImgButton.create({src:"[SKIN]/headerIcons/close.png"});

      Is it possible to capture the click event handler in SmartCLient like in javascript of closeButton ?

      If, the answer is yes, how do you do it?

      In jQuery is this:

      var inFormOrLink; $('a').on('click', function() { inFormOrLink = true; });
      $('form').on('submit', function() { inFormOrLink = true; });
      $(window).on("beforeunload", function() { return inFormOrLink ? "Do you really want to close?" : null; })

      Thanks for the support
      Last edited by dungino; 24 Dec 2021, 01:51.