Jump to content

UniStringGrid Cell Values with HTML


Franco Grech

Recommended Posts

Good Day to all of you.

I am having an issue with the UniStringGrid, I Would like to Load HTML to a cell in the Grid, i managed to do this, however i have a gaps in the Cells

635934738385694043.thumb.jpg.8a4012a661d5ef92bd7649c954b27474.jpg

This is the UniStringGrid and Between the cells there are Gaps how i can remove this?

The Code that its in the Cells:

 

function TPricePanel.GetBoxTXT(ADayNo, RightText, LeftText, BoxColor : string) : string;
begin
  Result:=
    //'<div class="container" style="min-width:' + Self.DefaultColWidth.ToString +'px; min-height:' + Self.DefaultRowHeight.ToString + 'px; position: relative; background-color: ' + BoxColor + ';">' + #13#10 +
      '<div style="margin: 0px; min-width:' + Self.DefaultColWidth.ToString +'px; min-height:' + Self.DefaultRowHeight.ToString + 'px;  position: relative; background-color:' + BoxColor + ';">'+ #13#10 +
        '<div style="position: absolute; top: 0; left: 10px;" >' + #13#10 +
            '<p style="font-size: 12px;">' + ADayNo + '</p>' + #13#10 +
        '</div>' + #13#10 +
        '<div style="position: absolute; bottom: 0; right: 10px;">' + #13#10 +
            '<p style="font-size: 15px;">' + RightText + '</p>' + #13#10 +
        '</div>' + #13#10 +
        '<div style="position: absolute; bottom: 0; left: 10px;" >' + #13#10 +
            '<p style="font-size: 15px;">' + LeftText+ '</p>' + #13#10 +
        '</div>' + #13#10 +
      '</div>';
    //'<div class="box" style="background: blue;"></div>';
end;

Thanks for any kind of help

Link to comment
Share on other sites

  • Franco Grech changed the title to UniStringGrid Cell Values with HTML

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...