Jump to content

azago

uniGUI Subscriber
  • Posts

    85
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by azago

  1. in UniCombox i have insert

     

    ClientEvents -> UniEvents -> function beforeInit:

    function beforeInit(sender, config)
    {
        config.inputCls = 'mycss';
    }

    in 

    CSS -> ServerModule->CustomCSS:

    .mycss
    {
     color:#91b4cd !important;
     -webkit-text-fill-color:#91b4cd !important;
     font: 14px Tahoma, Helvetica, sans-serif !important;
     font-weight:bold;
    }

    the family font for text UniComboBox change,  but how can I change the font of the combobox items?

    image.png.4709d706b12af00bcb1ed2389030bb99.png

     

    Thanks

  2. procedure TfDataEntry.unpdfrmDocLoaded(Sender: TObject);
    begin

    if unpdfrmDoc.PDFURL > '' then begin

          // download button
          UniSession.AddJS (unpdfrmDoc.JSName + '.iframe.contentWindow.document.'
              + 'getElementById ("download").style.display = "none"');
          UniSession.AddJS (unpdfrmDoc.JSName + '.iframe.contentWindow.document.'
              + 'getElementById ("secondaryDownload").style.display = "none"');

    end;

    end;

     

  3. I tried using a simple page with jquery and knobs in a uniHTMLFrame

    if I launch the html file from windows
    I see the following layout

    image.png.fb76f1f5169a3d6c95c8f74112765ad7.png

    if i load it in the
    uniHTMLFrame
    with the command
       UniHTMLFrameDashboard.HTML.LoadFromFile('index2.html');
    I get that

    image.png.2ea02a9fbe1565223946f53faee1a3df.png

    in servermodule.customfiles I entered
    dist / jquery.knob.min.js
    dist / jquery.min.js

    in the log I have no problem

    Project1.exe: 00000FF8: 19:00:31 []:> ----------------------------------- --------------------------- <
    Project1.exe: 00000FF8: 19:00:31 [TUniServerModule]: Server First Init.
    Project1.exe: 00000FF8: 19:00:31 [TUniServerModule]: Debug Mode = ON
    Project1.exe: 00000FF8: 19:00:31 [TUniServerModule]: Global Cache Folder Erased. <1> Files deleted.
    Project1.exe: 00000FF8: 19:00:31 [TUniServerModule]: Starting HTTP Server on Port: 8077 ...
    Project1.exe: 00000FF8: 19:00:31 [TUniServerModule]: HTTP Server Started on Port: 8077

    I attach the project sample

     

    Tanks

    Angelo

     

     

    KnobSample.zip

  4. Thanks Sherzod,

    the code works well !!

    Now I have tried to execute a command to go to a page of the pdf through code js using this command

     

     (take from https://stackoverflow.com/questions/31615248/pdf-js-changing-current-page-number-programmatically)

     MainForm.pdfFrame.JSInterface.JSCode('if ('#1'.iframe&&'#1'.iframe.contentDocument.getElementById("docIframe")){'#1'.iframe.contentDocument.getElementById("docIframe").contentWindow.PDFViewerApplication.page=' + Uniedit1.Text +' };');

    but not work (I'm a little poor in java).

     

    any ideas on how to do it?

     

    Thanks as always

    Angelo

  5.  

    Is it possible to press UniButton to know the current page of the pdf displayed in a UniPDFFrame using JS ?

     

    in the viewer.js i see 

        key: 'page',
        get: function get() {
          return this.pdfViewer.currentPageNumber;
        },
        set: function set(value) {
          this.pdfViewer.currentPageNumber = value;
        }
    or in internet i found

    iFrame.contentDocument.getElementById('pageNumber').value

     

    but I can't use it in a call js

    Thanks

    Angelo

     

     

     


  6. I need to be able to manage the page change of a pdf that is displayed through UniPDFFrame

    It would be nice if an AjaxEvent was activated at the page change with the page number displayed

    I prepared an example, taken from the Unigui samples, in which if it is possible to be able to populate a ListBox with the events of the page changes to move the position in the pdf

    Thanks
    Angelo

    HowTrapEventChangePagePD.zip

  7. I have 550 records in my view that with 25 records per page correspond to 22 pages.
    
    If I browse through the first and last page I see the records correctly.
    
    If navigate page by page is working correctly up to page 7 starting from the eighth page it does not show the 25 records 
    that one expects but only a single record that is the last and continues for the following pages.
     
  8. I use

    Delphi Rio Professional  10.3.2 

    Unigui 1509

    When I use the webOptions function Paged with lots of records the page view has problems

    Options

    image.png.e46e8c5a64db33a6049aaf9842af0ba3.png

    Results

    First Page

    image.png.37ba4c9972c71767f09f32b6e7d7fa1b.png

    Last Page

    image.png.6bb013cc77563f0c00ad36b3a9a41e4a.png

    but if from the first page I scroll one page at a time at a certain point (depending on the number of records)

    image.png.b792122dc730d4364e8e53fbb5932c63.png

    ...

    image.png.0781201734567306946707d46a67c2dc.png

    image.png.67360f05251373a2c1e5d081f7402e68.png

    Angelo

     

  9. I tried using, for change color in background, the instruction in form create

       ListaDoc.JSInterface.JSCallGlobal('Ext.util.CSS.createStyleSheet', ['#'+ListaDoc.JSName+'_id .x-grid-row-selected .x-grid-cell-inner { font-weight: bold;  background-color:white;  color: white;}', ListaDoc.JSName+'_css' ]);
    but when i start or select one row the background color is not white

    i use uni_sencha 

    I attach a sample demo

     

     

     

    Cattura.JPG

    _Request_Color_DBGrid.zip

  10. Until version 1498 I used a command to hide unwanted buttons while loading the PDF frame

    for example the button download using the js command

           UniSession.AddJS (uHTMLPDF.JSName + '.iframe.contentWindow.document.'
           + 'getElementById (' 'download' '). style.display = "none"');

    with the 1508 version the same action goes wrong

    image.png.29e58b82fa8cb50972471ad414e7bad7.png

    it is as if the version of iframe had different properties between 1498 and 1508

    What has changed?

     
     
     
     

     

    image.png

  11. Thanks. It Works.

     

     

    There is only one problem. If I click on an item and then move to another item, I find myself with 2 items selected as shown

    image.png.8814bbc651f59f9536eb6ab26764cedf.png

     

    with

    _treemenu .x-treelist, ._treemenu .x-treelist-row{
      background-color: white;
    }

    ._treemenu .x-treelist-row-over, ._treemenu .x-treelist-nav .x-treelist-item-selected > .x-treelist-row{
      background-color: #286090 !important;
    }

    ._treemenu .x-treelist-item-text, ._treemenu .x-treelist-item-icon, ._treemenu .x-treelist-item-expander {
      color: #286090;
      font-size: 14px;
    }
     

     

    it becomes so

    image.png.122a57df9749148ca99a70831f325bb0.png

     

     

    image.png

  12. I would like to know how to change the color and background of the selected row.
    
    For defualt the color of semlected row is white and therefore if I change the background color
    
    ._treemenu .x-treelist, ._treemenu .x-treelist-row{
      background-color: white;
    }
    
    I can't see the selected row again

    i tried

    ._treemenu .x-treelist-row-over, ._treemenu .x-treelist-nav .x-treelist-item-selected > .x-treelist-row{
      background-color: red;
    }

    but with UNIGUI v.1.90.0.1498 and Delphi Rio it  has no effect

     

     

  13. i've used 

    btnCopyToClipboard.ClientEvents.ExtEvents.Values['click']:='function click(sender, e, eOpts) '+
          ' { '+
          ' var textarea = document.getElementById("'+memSummary.JSName+'_id-inputEl"); '+
          ' textarea.select(); '+
          ' try { '+
          ' var successful = document.execCommand(''copy''); '+
          ' if(successful) console.log(''Copied!''); '+
          ' else console.log(''Unable to copy!''); '+
          ' } catch (err) { '+
          ' console.log(''Unsupported Browser!''); '+
          ' } '+
          ' }';

    for copy data to Clipboard and work fine.

    i tried to write the syntax to Paste data from clipboard 

       bPaste.ClientEvents.ExtEvents.Values['click']:='function click(sender, e, eOpts) '+
          ' { '+
          ' var textarea = document.getElementById("'+ memSummary.JSName+'_id-inputEl"); '+
          ' textarea.focus(); '+
          ' try { '+
          ' var successful = document.execCommand(''paste''); '+
          ' if(successful) console.log(''Pasted!''); '+
          ' else console.log(''Unable to paste!''); '+
          ' } catch (err) { '+
          ' console.log(''Unsupported Browser!''); '+
          ' } '+
          ' }';
        *)

    but not work.

     

    I don't know java. I tried to build the syntax for assonance ...

    Any idea how to write the correct code ?

     

     

  14.  

    I have some problems with using Panel Layouts with ScrollBox.

    I have attached a demo where by pressing a button in area 1 a list of objects is generated in the uDocList panel.

    The idea is that the expand / collapse of the various panels the scrollbox moves eventually disappearing if the objects can stay in the video.

    How do I make the ScrollBox that contains the last panel of the page use the whole screen (fit).

    It has no layout property ...

     

    Thanks for your help.

    Demo.zip

  15. How can i SET the title from specified column at runtime with js?

     

    I tried to use

         MyGrid.Columns[n].Title.Caption := 'New Title';

    before to open dataset but non working ....

    Delphi Rio

    uniGUI version 1.90.0.1498

     

     

     

×
×
  • Create New...