Jump to content

Timothy lam

uniGUI Subscriber
  • Posts

    55
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Timothy lam

  1. Hi,

    I create the frame inherit and got the following error. The following is creating the new sheet. The next coding is about the new frame. Anything is wrong?

        FCurrentFrame := TUniFrameClass(FindClass(FormClassName)).Create(sheet);
     

    image.png.da4435827aaf8933e69ba5ee6aff5e9d.png

     

    type
      Tfrm_Department = class(TBaseFrame)
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    implementation

    {$R *.dfm}

    initialization
      RegisterClass(Tfrm_Department);

    finalization
      UnRegisterClass(Tfrm_Department);

     

    Thanks!!!

  2. Hi,

    I'm using the following code to set the icon. But it show the menu text without any icon in TreeView. Am I missing something?

     

          if (dm1.cdsMenu.FieldByName('Module_PID').Text = '0') or (dm1.cdsMenu.FieldByName('Module_ID').Text = dm1.cdsMenu.FieldByName('Module_PID').Text) then
            // add root node
          begin
            Node := UniTreeView1.Items.AddChild(nil, dm1.cdsMenu.FieldByName('Module_Name').Text);
            mainIconFile :=  Path+'Icons\main.ico';
            if FileExists(mainIconFile)  then
            begin
              mainindex := UniNativeImageList2.AddIconFile(mainIconFile);
            end
            else
              mainindex := -1;
            Node.ImageIndex := mainindex;
          end
          else
          begin
            // add child node
            Index := List.IndexOf(dm1.cdsMenu.FieldByName('Module_PID').Text);
            Node := UniTreeView1.Items.AddChild(TUniTreeNode(List.Objects[Index]), dm1.cdsMenu.FieldByName('Module_Name').Text);

            groupIconFile :=  Path+'Icons\Database.ico';
            if FileExists(groupIconFile)  then
            begin
              grpindex := UniNativeImageList2.AddIconFile(groupIconFile);
            end
            else
              grpindex := -1;
            Node.ImageIndex := grpindex;
          end;
     

  3. 6 minutes ago, irigsoft said:

    I'm not sure how to make it all work without making different designs for different platforms, but here's my solution:

    1. I have a VCL application - ERP

    2. Another VCL application with different user designs - POS software

    3. Now add a uniGui server with the capabilities of POS software, but for the web

    At the moment I only have one web server and it works like this:

    1. The created designs are used by POS (this helps me to create dynamic elements and functionality)

    2. I wrote an Android application using webview

    And the result is:

    I have a mobile platform and without coding it works on mobile devices and web browsers.

    If a User of VCL POS software goes to the WEb, I simply add the uniGui web application and give them the ability to work in a browser without losing their functionality.

    If the user wants to work in a mobile device, I make a design for a mobile device (to optimize the space in the mobile device).

    I have my own designer and I write the designs in XML files, and this allows me to encode one design + functionality once and it works equally on all platforms

    My solution is something like your solution. We want to achieve Industrial 4.0 & Enterprise 4.0. So I need to build the new platform that can collect the data between all systems. It can provide the consolidate information and let management to have fast decision making. Besides, this middleware platform need to assist all systems if those systems can't handle and communicate with other systems.

  4. Just now, irigsoft said:

    On what platform will be used this application, mobile device ?

    Currently is using VCL application under 2-tier design that communicate with all systems. Now I want to migrate the application to 3-tier with multi-platforms. I want to doing C/S and B/S (Web & Mobile) because we have multi-branches in different countries. We can't using B/S for all applications because we have MES, ERP, EAM, FAM, WMS systems that may have performance issues. But B/S is a good solutions for management who can easy monitor the manufacturing status in anywhere. However, I haven't any experience for web platform design that so need always to ask for help.😅

  5. 4 minutes ago, irigsoft said:

    Why is Your need to hide address bar ?

    Minimize is not work even without full screen.

    User can easy click other browser features because the their experience. Then it will cause some unknown issues such as press refresh button. I already set UniGUI to warn the user if press refresh. Besides, I disable the right click, backward button that minimize the human mistake.

    User can minimize the browser in normal mode.

  6. 38 minutes ago, irigsoft said:

    Sorry, this must be added in procedure TYourForm.UniFormCreate(Sender: TObject);

    I added "launchIntoFullscreen(document.documentElement);" in UniLabel.ClientEvents.ExtEvents and your Script in Main.Script. It hasn't any effect. I guess I may make something wrong and missing something.

  7. 15 minutes ago, irigsoft said:

    No,

    I use this when click on login button:

    //if has settings
    if (StrToBool (UniServerModule.SistemSettingsList.Values ['WebFormInFullScreen']) = True)
    //only for desktop
    //AND (UniApplication.UniPlatform = [upDesktop])
    then begin
        UniButtonLogIn.ClientEvents.ExtEvents.Values['click'] := 'function click(sender, eOpts){ launchIntoFullscreen(document.documentElement);}';
    end;
     

    I tried the above code and only put "UniButtonLogIn.ClientEvents.ExtEvents.Values['click'] := 'function click(sender, eOpts){ launchIntoFullscreen(document.documentElement);}';". That is without any effect.

  8. Hi,

    Is it possible to hide the browser address bar? I found the oldest post that using the following shortcut. But it is not my expected solution because we will not create any shortcut for users.

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=http://yourSiteAddress:8077

  9. 34 minutes ago, Hayri ASLAN said:

    Hello

    For the right side you can use Triggers. For the left side you can use something below

    UniServerModule -> CustomCSS

    
    
    .icon-textfield:before {
        position: absolute;
        height: 100%;
        z-index: 9999;
        left: 5px;
        font-size: 12px;
        top: 25%;
    }
    
    .icon-textfield .x-form-text {
        padding-left: 20px;
    }

    YourForm.OnReady Event

    
    
    procedure TMainForm.UniFormReady(Sender: TObject);
    begin
      with UniEdit1, JSInterface do
      begin
        JSCall('inputWrap.addCls', ['fa fa-user icon-textfield']);
      end;
    end;

    Result

    image.png.fcdf75ea8482fabe2ecf67ed60683203.png

    It works. Thanks. But it override the original width of UniEdit. Am I need to resign the width individually?

  10. Hi,

    I created the new UniGui standalone project. After I completed the login form, I try to input the data in UniEdit field. The cursor can focus on UniEdit. But I can't input anything in there. I tried to create the other new project without anything. Only put the UniEdit and then test it. I can input the data. So I don't know why I can't input the data in previous project. I remarked all custom CSS and test it. The result is the same. How can I check the problem and solve it. Please advise.

    Thanks

×
×
  • Create New...