
This method draws text on the control. If the text is going to be drawn outside the allowable width area the text is automatically wrapped around to the next line or lines. A bounding rectangle is used to define where the text is to be drawn.
Returns the following according to the situation:
The recommended convention is passing the control identifier directly:
Copy Code |
|---|
(Odcl_PictureBox_DrawWrappedText MyControlReference [as Reference] (list (list UpperLeftX [as Integer] UpperLeftY [as Integer] Width [as Integer] ForeColor [as Color] [Optional] BackColor [as Color] Text [as String] Justification [as String]) (list UpperLeftX [as Integer] UpperLeftY [as Integer] Width [as Integer] ForeColor [as Color] [Optional] BackColor [as Color] Text [as String] Justification [as String]) ... ) ) |
An alternative convention is to identify the control by providing the project file, the dialog name and the control name:
Copy Code |
|---|
(Odcl_PictureBox_DrawWrappedText ProjectFile [as String] DialogName [as String] ControlName [as String] (list (list UpperLeftX [as Integer] UpperLeftY [as Integer] Width [as Integer] ForeColor [as Color] [Optional] BackColor [as Color] Text [as String] Justification [as String]) (list UpperLeftX [as Integer] UpperLeftY [as Integer] Width [as Integer] ForeColor [as Color] [Optional] BackColor [as Color] Text [as String] Justification [as String]) ... ) ) |
This function requires that the component is showing. Otherwise it has no effect.
The height parameter is automatically calculated and returned with the method. If the BackColor argument is not passed the PictureBox's BackColor property is use.
Please create lists as follows using the list keyword:
(list (list x y ...) (list x y ...) ...)
It seems that ObjectARX does not always handle lists created as follows:
'(x y ...) (x y ...) ...
Copy Code |
|---|
; Draw text (Odcl_PictureBox_DrawWrappedText MyProject_MyForm_MyControl (list (list 50 50 500 -17 -27 "Some text" "C") (list 50 100 500 -17 -27 "Some other text" "R") ) ) |
PictureBox_DrawArc, PictureBox_DrawCircle, PictureBox_DrawEdge, PictureBox_DrawFillRect, PictureBox_DrawFocusRect, PictureBox_DrawHatchRect, PictureBox_DrawLine, PictureBox_DrawPoint, PictureBox_DrawRect, PictureBox_DrawText