Jump to content

rgreat

uniGUI Subscriber
  • Posts

    421
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by rgreat

  1. Same project. Same browser.

    But UniPanels have different heights when generated by linux or windows standalone hosts, and some bottom controls even disappear from view.

    Seems that that's depends on TitleVisible = True property.

    Server on Windows:

    image.png.6a30d1945790fb508633aafb59cb4a2c.png

    Server on linux:

    image.png.f210ba9d75d329e3dcd262b6289cf736.png

     Numbers in title are generated by code hook in uniPanel.pas:

    function TUniCustomPanel.GetEffectiveHeight: Integer;
    var
      BH : Integer;
    begin
      Result := inherited GetEffectiveHeight;
    
      Result := Result - (GetBorderWidth * 2);
    
      if FTitleVisible or FCollapsible then
        case FTitlePostion of
          tpTop,
          tpBottom:
            begin
              BH := UniSession.CurrentTheme.PanelBandHeight;
              Result := Result - BH;
              
              if Pos(Name,Title)=0 then Title:=Name; 
              Title:=Title+' '+Result.ToString; // <-------
            end
        end;
    end;

    Why I have extra GetEffectiveHeight calls and numbers are different and incorrect on Linux?

     

    Also: right margins are different too. By a few pixels, but still not good.

  2. A bit more universal approach. Still not perfect, though.

    if HTTPSRedirect then begin
      var Port1:='';
      var Port2:='';
      if Port<>80 then Port1:=':'+Port.ToString;
      if SSL.SSLPort<>443 then Port2:=':'+SSL.SSLPort.ToString;
    
      var s:='';
      if (Port1<>'') or (Port2<>'') then begin
        s:='      if (loc.indexOf('''+Port1+'''+''/'')>0){'#13#10+
           '        loc = loc.replace('''+Port1+'''+''/'','''+Port2+'''+''/'');'#13#10+
           '      }'#13#10;
      end;
    
      s:='<script language="JavaScript">'#13#10+
         'function redirectHttpToHttps()'#13#10+
         '{'#13#10+
         '    var loc = window.location.href+'''';'#13#10+
         '    if (loc.indexOf(''http://'')==0){'#13#10+
         '      loc = loc.replace(''http://'',''https://'');'#13#10+
         s+
         '      window.location.href = loc;'#13#10+
         '    }'#13#10+
         '}'#13#10+
         'redirectHttpToHttps();'#13#10+
         '</script>';
    
      CustomMeta.Text:=s;
    end;

     

    • Like 1
  3. 8 hours ago, irigsoft said:

    Hello,

    try to set UniDBGrid.RowHeight = 2 (or 5) and on SQL.Text You can use html format, so You can show result in some rows with <h1>youcolumndata<h1> and other with <h3>yourcolumndata</h3>.

    Different rows with different text format

    Nope. Setting UniDBGrid.RowHeight:=5 does not change grid at all.

    Maybe that's because I have some text in hidden column. But I can't change that text since it is used for row grouping.

  4. The paintbrush is my friend. :D

    Clipboard05.thumb.jpg.c172a7c19c96872b49389cd6a0ab1402.jpg

    This is the desired result. More or less.

    And if that could be done without adding extra data rows - I would be happy.

    I imagine something could be done without extra rows, with cell CSS above or below the delimiter, but I'm afraid it would compromise something.

  5. 6 hours ago, Sherzod said:

    Which case, could you please explain in more detail? For what purpose?

    I want to draw something like this:

    image.png.f3bf0c8a6973ba99c68bfb6cb6fa58a0.png

    I have this (work in progress):

    image.thumb.png.5344dfcdee3e8694ccf5fe672b8adb9f.png

    I need to create delimiters between data row groups.

    I know, usually you can use Grouping  or cell coloring for that, but not in my case, as both of these are already used, and I still need to create extra delimiters between rows inside one conventional row group. 

    On screenshot above I have grey empty rows acting as delimiters, but these are too thick to look good.

×
×
  • Create New...