<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css">
<title>
Gambas Documentation - Label &amp; TextLabel
</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../help+en"><img class="flag" alt="Home" border="0" src="../../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../guicomp+en">Up</a>&nbsp;
<a href="combobox+en">Previous</a>&nbsp;
<a href="listbox+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
Label &amp; TextLabel
</h1>
<ul>
<li><a href="../../comp/gb.qt/textlabel+en">TextLabel</a> understands a subset of HTML, not <a href="../../comp/gb.qt/label+en">Label</a>.
<li><a href="../../comp/gb.qt/label+en">Label</a> interprets a '&' as a shortcut indicator. I think the GTK+ equivalent is '_'.
<li>By default, <a href="../../comp/gb.qt/label+en">Label</a> is vertically centered and horizontally left aligned (or right aligned for rtl languages).
<li>By default, <a href="../../comp/gb.qt/textlabel+en">TextLabel</a> is top left aligned (or top right for rtl languages).
<li><a href="../../comp/gb.qt/textlabel+en">TextLabel</a> inserts automatically a line break at words boundary. <a href="../../comp/gb.qt/label+en">Label</a> does not.
<li>If <a href="../../comp/gb.qt/label+en">Label</a>.AutoResize is set, the <a href="../../comp/gb.qt/label+en">Label</a> width & height automatically fit its contents. But if the <a href="../../comp/gb.qt/label+en">Label</a> is vertically centered, then only the width is adjusted, not the height. Not very coherent, but practical. To be more coherent, only the height should be adjusted if the <a href="../../comp/gb.qt/label+en">Label</a> is horizontally centered.
<li>If <a href="../../comp/gb.qt/textlabel+en">TextLabel</a>.AutoResize is set, the height is adjusted according to the width, so that all text is displayed.
<li>Be careful with the border size with the previous requirements!
</ul>

</div>
</body>
</html>

