Jump to content

cbr

uniGUI Subscriber
  • Posts

    19
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by cbr

  1. Hi cid,
      a few years ago I used RFID readers with USB connection that emulate keyboard just like BAR Code readers: very easy...
      If you need a bluetooth as connection, you should use something like this https://www.aliexpress.com/item/32848645949.html?spm=a2g0o.search0302.0.0.797a6fb9BF8kcO&algo_pvid=76e2e398-866c-42e7-beae-c8489582311a&algo_expid=76e2e398-866c-42e7-beae-c8489582311a-12&btsid=2100bdec16116113563854403e0e74&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_ ?
    regards
    Cesare

  2. Hi Doug,

      I follow this steps in my new server with  Windows 2012 R2 Server connected with a  remote MySQL 5.7 server:

    1) using a simple standard VCL app (64 bit), for testing,  with a grid that reads a table from the remote MySQL
    2) copy in c:\windows\system32 the 2 dll libmysql.dll and vcruntime140.dll (you can find the two dlls in the attached file: keep in mind that they are valid for my specific case...)
    3) launch the exe file: it works fine.

    In my case,  was not necessary install the MySQL C Connector and register the dlls.
    The app works also with the dlls directly in the same folder of the application.

    If this works, you can try again with the Unigui application.

    I hope you find it useful,
    Cesare

    libmysql.rar

  3. even in my case it was not easy ...

    could you try this?
    1) as suggested by Mehmet, install the 64 bit C++ connector  (https://dev.mysql.com/downloads/file/?id=494747)

    2) copy in C:\Windows\System32 (and register) the 64 bit libmysql.dll that you find in \Program Files\MySQL\MySQL\MySQL Connector C xx\lib 

    3) leave the property TFDPhysMySQLDriverLink.VendorLib empty

    Sorry, but I have no chance to test a fresh installation right now, so I'm not sure of the result...
    best wishes!
    Cesare

  4. Hi Rafael, 
      the main suggestion is not use the Align property that implements a server side alignment.
    Instead of that, in MainForm and in every contained panel, set the property AlignmentControl to
    uniAlignmentClient that uses the powerful client side alignment of ExtJs.
    You should find many examples in the forum (like http://forums.unigui.com/index.php?/topic/7848-layout-advanced-tutorial/and in Clientside Alignment part of demos of  your UniGui installation.
    For your specific question you can check also the Reference Manual in 
    http://www.unigui.com/doc/online_help/api/LayoutForm.html

    Regards
    Cesare

    • Like 1
    • Upvote 1
  5. Hi MOSGY
      a simple example:

    a) put in the HTMLFrame this code 

    <script>
        function callServer(elmnt, event) {
            var HTMLFrame = Ext.getCmp("_HTMLFrame"); 
            var params=[];
            
            switch (elmnt.type) {
                case "text":
                    params = ["id="+elmnt.id, "val="+elmnt.value, "xevent="+event ];
                    break;
                case "button":
                    params = ["id="+elmnt.id, "val="+elmnt.value, "xevent="+event ];
                    break;
                case "checkbox":
                    params = ["id="+elmnt.id, "val="+elmnt.value, "checked="+elmnt.checked, "xevent="+event ];
                    break;
            };
            
            if (params.length>0) {
                ajaxRequest(HTMLFrame, 'callserver', params);
            }
        }
    </script>
    
    ...
    <span> <a href="#" style="text-decoration: none; color:white" onclick="callServer(this,'onclick')">3</a></span>


    b) in MainForm you can write the server side code in OnAjaxEvent
     

    procedure TMainForm.HTMLFrameAjaxEvent(Sender: TComponent; EventName: string;
      Params: TUniStrings);
    var
      sParam: string;
    begin
      if EventName = 'callserver' then
      begin
        sParam := Params['id'].AsString;
        if sParam = 'P' then
        begin
           ...
        end;
      end;
    end;



    best regards

  6. Hi Frances, 
      I suggest not mix the AlignmentControl uniAlignmentClient and uniAlignmentServer.
    If you use uniAlignmentClient (it is the fastest way) , don't use the Align property but the powerful LayoutConfig properties.
    Attached I propose some changes to your code, using the first Sherzod suggestion.
    Regards from Italy,
    Cesare

    ServerModule_1.zip

  7. Hi Mierlp,

     

      my suggestions:

     

    - in frmAccount form, set AlignmentControl to uniAlignmentClient for each panel

    - UniPanel_Main

        Layout = fit
        LayoutAttribs.Align = stretch

    - add a new panel inside a UniPanel_Main and move inside UniDBEdit_Name and UniLabel_Name

    - for this panel

         Layout = 'vbox'

         LayoutAttribs.Align = center
         LayoutAttribs.Pack = start
         LayoutConfig.Flex = 1
    - optionally for UniDBEdit_Name and UniLabel_Name add a top margin with
            LayoutConfig.Padding = '10 0 0 0'
     

    see in the attached file the changes.

    regards
    Cesare

    frmAccount.zip

  8. Oliver can you give us an example how you use it with unigui?

    Hi Skepsis,

     
      a simple (server side) way to use the Google Material Icons is: 
     
    1) add the reference to Material Icons in ServerModule
        procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
        begin
          ...
          CustomMeta.Add(  '<link href="https://fonts.googleapis.com/icon?family=Material+Icons"rel="stylesheet">' );
        end;
     
    2) Insert in the form a TUniLabel with 
        AutoSize:    False
        Caption:     the icon name; see in https://design.google.com/icons
        Font.Name:  'Material Icons';
     
    You can set the color and the size.
     
    See the page https://design.google.com/icons  for available icons.
    In the TUniLabel caption property, replace the space contained in the name with the char "_": if the icon name is  "shopping cart", write shopping_cart in the caption.
     
    Cesare

    post-662-0-10709900-1474322456_thumb.jpg

    GoogleMaterialIconsDemo.rar

×
×
  • Create New...