Jump to content

likemike

uniGUI Subscriber
  • Posts

    356
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by likemike

  1. Try this way:

    1. install OpenSSL (https://www.openssl.org/)

    2. Create a directory (f.ex. SSL)

    3. in this directory put the key.pem, the  *.ca-bundle and the *.crt file

    4. Create a batch file with this content:

    REM adapt first line, if you had installed OpenSLL on a different drive/directory
    set exepath="C:\Program Files\OpenSSL-Win64\bin\openssl.exe"
    ren *.crt certificate.crt
    ren *.ca-bundle ca_bundle.crt
    %exepath% x509 -in certificate.crt -out cert.pem -outform PEM
    %exepath% x509 -in ca_bundle.crt -out root.pem -outform PEM

    5. start the batch in the created directory

    6. copy all files (except the batch file) to your UniGui project directory.

    • Thanks 2
  2. Shame on me - that was my own question...

    Unfortunately _taphold won't work on some browsers in an UnimVideo, because they use it for a context menu to download the video.

    Where can I find all the valid parameters like "_taphold", "_dblclick" etc.?

  3. Hello!

    Finally I find the solution in this forum:

    procedure TMainmForm.UnimVideo1Ended(Sender: TObject);
    begin
      UniSession.AddJS('var me=' + TUnimVideo(Sender).JSName + '; if (!me.isInlineVideo){me.media.hide();me.ghost.show()}');
    end;
    
    procedure TMainmForm.UnimVideo1Play(Sender: TObject);
    begin
      UniSession.AddJS('var me=' + TUnimVideo(Sender).JSName + '; if (!me.isInlineVideo){me.ghost.hide();me.media.show()}');
    end;

    (copied from Sherzod)

  4. On 12/8/2020 at 8:18 AM, irigsoft said:

    Hi,

    I use CSS to hide titles of uniDBGird, please try this on CSS:

    /*Hide panel on uniDBGird*/
        /*   Upper panel  */
        /*.x-docked-top, */
        /*   Down panel   */
        /*.x-docked-bottom, */

        .x-docked 
        {
        /*            visibility: hidden !important; */
            height: 0px !important; 
        }

    /*Hide upper panel - Column Titles*/
        .x-grid-header-ct {
        /*            visibility: hidden !important; */
            height: 0px !important; 
        }

    /*Hide down panel - page buttons */
        .x-grid-paging-toolbar {
        /*            visibility: hidden !important; */
            height: 0px !important; 
        }


     

    Hello!

    This CSS doesn't work with mobile.

  5. Hello Sherzod!

    I think the problem results form that line: 

    SetSize(200, 200);

    If the source picture already has the used size (here 200x200), the picture is displayed correctly. If the picture has a bigger size, the quality decreases when resizing it.

    My workaround is to transform all pictures to the wanted size before loading.

     

  6. Hello!

    I use the fieldimage option in an UnimDBGrid.

    Code:

    PROCEDURE TMainmForm.UnimDBGridFieldImage(CONST Column: TunimDBGridColumn; CONST AField: TField; VAR OutImage: TGraphic; VAR DoNotDispose: BOOLEAN; VAR ATransparent: TUniTransparentOption);
    VAR unimImage: TUnimImage;
    BEGIN
        IF AField.FieldName='GRAFIK' THEN BEGIN
            DoNotDispose:=TRUE;
            ATransparent:=toNone; { !! }
            IF TFile.Exists('Picture1.jpg') THEN BEGIN
                unimImage:=TUnimImage.Create(self);
                TRY
                    unimImage.Picture.LoadFromFile('Picture1.jpg');
                    OutImage:=TBitmap.Create;
                    WITH (OutImage AS TBitmap) DO BEGIN
                        Transparent:=FALSE; { !! }
                        SetSize(200, 200);
                        OutImage.Assign(unimImage.Picture.Graphic);
                    END;
                FINALLY
                    unimImage.Free;
                END;
            END;
        END;
    END;

    In the grid the picture is shown transparent although I set all transparency values to false.

    Here a screenshot with focus - you can see the cloudy part of the picture at the left bottom appears yellow:

    s1.jpg.bf02a2594680ca99a61600f1847c23a8.jpg

    here without focus - you can see the cloudy part of the picture at the left bottom appears lightblue:

    s2.jpg.d6c00d2af7349d0b014f526af1761f87.jpg

    and here is the picture how it should be displayed:

    s3.jpg.53e5691161290b22112c7f002a87e0c0.jpg

    Any help would be appreciated!

    Best regards

    Mike

     

  7. Hello!

    First you have to add UnimDBGrid->ClientEvents_>ExtEvents->childtap

    function childtap(sender, location, eOpts)
    {
       ajaxRequest(sender, '_cellclick', ["colIndx="+location.columnIndex]);
    }

    2nd you have to add the OnAjaxEvent-method like this:

    procedure TMainmForm.UnimDBGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings);
    VAR
        strClickObject : STRING;
    BEGIN
        IF (EventName='_cellclick') THEN BEGIN
            strClickObject:=Params.Values['colIndx']; //holds the index of the column (from 0 to n)
            IF (strClickObject='1') THEN BEGIN // for ex. if the 2nd column is clicked
             :
            END;
        END;
    end;

    Hope that helps...

  8. Hello!

    In my UnimCalendarPanel the setting of the DayTimeFormat and WeekTimeFormat doesn't effect anything. I've tried HH:mm or hh:mm or HH:nn etc. but the panel always shows the time in am/pm-format. I want to display the time in 24-hour-format.

    Another issue with UnimCalendarPanel is, that I want to make the insert button (+ button) invisible in the navigation bar. I can disable the complete nav-bar, but the other functions are still desired.

    Best regards

    Mike

  9. Hello!

    I've got an TUnimDGBrid which is paged.
    If I scroll to the last row of the first page and I go to the next page (using the pageslider) the position of the grid is on the last row on the 2nd page. 
    But I need the position of the grid at the beginning (top) of the 2nd page.

    I've tried something like that in : UnimDBGrid ->ExtEvents-> pageSlider.change

    function pageSlider.change(me, newValue, oldValue, eOpts)
    {
       pageData.toRecord = 1
    }

    but that doesn't work.

    Any help will be appreciated

    Mike

  10. You can use an UniCarousel, too. And use the Onchange-event to allow to slide to the next page or raise some error messages if fileds are not filled correctly.

  11. Hello!

    Since 3 days I'm trying to solve a strange behaviour of UnimURLFrame in combination with JavaScript.

    I've prepared 2 test cases to show what I mean.

    The test cases have both a little HTML (for displaying a button) and a file named error.js which assigns to the button an event and starts an AjaxRequest. Each call of the JS-file shows a "Test"-message in the console as well. Because of that, you have to start the test case and press F12 to see the console.

    The first test case has only the Mainm-form. When you start it, there is one "Test"-message in the console. If you press the "Start"-button nothing else happens.

    The second test case has another form, which is called by the button on the Mainm-form. When you start it and you press the button on the main form there is one "Test"-message in the console (equal to the 1st test case). If you press the "Start"-button, another "Test"-message appears (so the JavaScript is executed a second time). Why? This causes al lot of side effects and my app doesn't work as it should. 

    I've tried a lot of "tricks" to prevent the 2nd execution, but nothing worked for me.

    Any help would be appriciated

    Unigui1.rarUnigui2.rar

×
×
  • Create New...