Open main menu

CDOT Wiki β

Changes

Project A2 20141 - OOP344

630 bytes added, 18:43, 9 March 2014
CLabel: Clarified parent width/height blurb
== CLabel ==
A CLabel is an uneditable line of text to be displayed somewhere on the screen. It inherits from CField.
 
=== Clarifications ===
Please note that when drawing a CLabel, be sure '''not to exceed''' the parent's available width/height. If the label is to exceed the parent's width/height, be sure to '''stop drawing''' at the point at which the excess would occur.
* Eg, if we have an unframed label with the text "Hello I am a label" in a framed parent with a width of 5 and a height of 4 and the coordinates of the label are (x2,y1), it will '''incorrectly''' exceed as follows if no checking is done:
<pre>
/----\
| |
| Hello I am a label
\----/
</pre>
* The correct way to display the above would be:
/----\
| |
| He|
\----/
== CLine ==