Jump to content

TUniDBText - Alignment


Recommended Posts

I have put a TUniDBText inside a resizable TUniPanel (panel + splitter). The query is something like this

   '<table width="100%" border="0">'
        ||'<td><font size="3" face="Calibri,Arial"><b>'||SURNAME||' '||NAME||'</b></font></td>'
        ||'<td align="right"><font size="2" color="gray" face="Consolas,Courier New">'||AGE||' Years old</font></td>'
        ||'<td colspan = "2"><font size="3" face="Calibri,Arial">'||DESCRIPTION||'</font></td>'
 ||'</table>'     name
from my_table x

So, for instance, it can produce an HTML like

<table width="100%" border="0">
        <td><font size="3" face="Calibri,Arial"><b>John Smith</b></font></td>
        <td align="right"><font size="2" color="gray" face="Consolas,Courier New">50 Years old</font></td>
        <td colspan = "2"><font size="3" face="Calibri,Arial">Nice guy!</font></td>

the dbtext component is configured as follows

Align = alTop



while its container

Align = alLeft


and the splitter

Align = alLeft



As you can see the AGE is right-aligned, so as I resize the panel to the right I expect to see the table to fit the entire panel, but instead it stays aligned to the left.


If I put the same HTML table in a DBHTMLMemo it works as expected but the component is super heavy and overkill for my purposes (i need a read only component with no background)

Link to comment
Share on other sites

Join the conversation

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

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...