Jump to content

mhmda

uniGUI Subscriber
  • Posts

    1141
  • Joined

  • Last visited

  • Days Won

    157

Posts posted by mhmda

  1. Easy, then call your button from the js code (at load event as shown in picture like this:)

    MainForm.mybutton.fireEvent('click',MainForm.mybutton);

    Remember for security issue the button should be visible otherwise it will not work (at design time) in order to hide it @ runtime then use UniEvents->beforeInit and set hidden to true:

    function beforeInit(sender, config)
    {
      config.hidden=true;
    }

    OR

    Put your button on UniHiddenPanel 🙂

  2. It will NOT change !!!

    You have to do it with the help of the client-side, this will help you, replace MainForm.form with your target object:

    UniSession.AddJS('MainForm.form.bodyCls="desktopwallpaper1"');

    and in servermodule add your css  for bg images:

    .desktopwallpaper1
    {
     background-image: .........
    }
    .desktopwallpaper2
    {
     background-image: .........
    }
    .desktopwallpaper3
    {
     background-image: .........
    }

     

    • Like 1
  3. You can use the helper function NewCacheFileUrl:

    targetFile:= ServerModule.NewCacheFileUrl(False, 'jpg'{file extension}, '', '', AUrl, True);

    CopyFile(PChar(SrcFileName),PChar(targetFile),false);

    Then use the AUrl for your end user.

    • Like 1
×
×
  • Create New...