Jump to content

PS1

uniGUI Subscriber
  • Posts

    95
  • Joined

  • Last visited

Posts posted by PS1

  1. On 1/26/2021 at 3:15 PM, Dm_Ufa said:

             fsGlobalUnit.AddClass(TUniCustomButton, 'TButton');
             fsGlobalUnit.AddClass(TUniButton, 'TUniCustomButton');

     

             fsScript1.AddObject(B.Name, B);

    That works for me, but how can i have access to e.g. JsName property of UniButton ?

    i can access to delphi properties like name,  caption etc. but when i want to access unigui properties like JsName then i have an error:

    Undeclared identifier: 'jsname' 

  2. Ok, but this solution don't help me much. I want to show in the TipText my data from the dataset and value of UniTrackBar telling me from which record of dataset i must get data. Like this:

    Procdeure UniTrackBar1Change(Sender:TObject);
    begin
    	AdoQuery.RecNo := UniTrackBar1.Value;
    	UniTrackBar1.TipText := AdoQuery.FieldByName('data').AsString;
    end;

     

  3. How can i update marker postion on unimap in runtime by code?

    I can remove marker and add new one with new coordinates, but it working very slowly. i tried editing UniMap.pas with my function below but it giving me error : "JS Error: Cannot read properties of null (reading 'lat')"

    procedure TUniMapMarker.SetLatLng(Lat,Lng:double);
    begin
      with FOwner do
        JSCallGlobal(FMarkerJSName+'.setLatLng', [Lat,Lng]);
    end;

     

    I took it from the documentation : https://leafletjs.com/reference.html#Marker

    @Hayri ASLAN

  4. i dont't think there are libraries.

    In html i see this component has a lot of spans with ,,Left" and ,,Width" described in percentage value.

    Can't rly give you a link.

    image.png

  5. First what i want is caption inside the UniTrackBar. Is it possible ? I want  to show there period for specific time/datetime.

    Second i want have/draw a rectangle like in the picture. The blue parts tell me that something happend in these parts of time. 

    The purpose of that is that i can scroll thru the timeline and on map i will show position of a moving car in that time. 

  6. is it possible to create ,,timeline bar" like in the picture below ?

    I see i can use UniTrackBar for the part of it but i don't know how to write time/date caption in it.

    And how can i make the rectangle with periods(blue parts) ? 

    image.png.c166a9e001f50c23c78c55508c0e5eba.png

  7. Is it possible to make all unimap markers popups visible all the time ?

    I want to show users some text which is written inside popups. I can show them by procedure "UniMapMarker.Openpopup" but when i click on unimap the popups are hiding.

    I tried to showing them all again on UniMap.OnClick but there is a problem that when i open them then the view is going to the last opened marker. 

  8. How can i use code below in DBGrid. When i just copy paste this, it doesn't work.

    (this code is used on mobile GridList and works)

     

    function beforeInit(sender, config)
    {                   
    
      config.loadingText=false;
      config.grouped=false;
     // config.selectedCls='';
      config.itemTpl='<table style="width:100%;white-space: nowrap;vertical-align:middle;">'+
      
                      '<tr>'+
                           '<td style="color:#0160a9;padding-left:0px;font: bold 18px/24px helvetica, arial, sans-serif" colspan="2">{0}</td>'+
                      '</tr>'+
                      
                      '<tr>'+
                           '<td style="font: 15px helvetica, arial, sans-serif;padding-top:4px;color:#535454;">{1}</td>'+
                      '</tr>'+
                      
                      '<tr>'+
                           '<td style="font: 15px helvetica, arial, sans-serif;padding-top:4px;color:#535454;width:80%;white-space: normal;word-break: break-word;">{2}</td>'+
                      '</tr>'+                                
                                                                        
                      '</table>';
    
    }

     

  9. Please change code under in file ,,UniCalendarPanel.pas".

    Basically if there is 1 calendar item added and i will search for second one it will return the first one instead of nil...


    function TUniCalendarList.GetCalendarFromId(CalendarId: Integer): TUniCalendarItem;
    var
      I: Integer;
    begin
      Result := nil;
      for I := 0 to Count - 1 do
      begin
        Result := Items[I];
        if Result.CalendarId = CalendarId then Exit;
      end;
    end;

    • Thanks 1
  10. Hey, i want to work with unimcalendar on mobile and found that resizing event is badly implemented. To be able to resize event you have to tap and hold for a second to show the ,,=" mark, then you have to drag this mark to resize. And this is kinda ok.

    But the problem appears when you use eventClick e.g. to change the event. if you tap and hold for a second it fires this event so u cant resize it anymore(new form shows). 

    Is there a solution to e.g. check if the mark ,,=" is visible and add ,,if case" in event method to dont show new form ?

    i Attachted test case from touch samples

     

    image.png.0659a1908c390fde5ce4773be009b2ff.png

    CalendarTestCase.zip

×
×
  • Create New...