How to change a label text?

5 posts / 0 new
Last post
AmigaBlitter
AmigaBlitter's picture
Offline
Last seen: 6 years 3 months ago
Joined: 2012-02-18 19:55
How to change a label text?

hello,

I have a label defined in this way:

LAYOUT_AddImage, gadgets[GID_LABEL] = IIntuition->NewObject(LabelClass, NULL,
GA_ID, GID_LABEL,
LABEL_Text, "Description label - bla bl bla bla",

How can i change the text of the label later?

Thank you

AmigaBlitter
AmigaBlitter's picture
Offline
Last seen: 6 years 3 months ago
Joined: 2012-02-18 19:55
Thank you for the

Thank you for the explaination.

Could you please point me to an example code for both cases?

in the end i used the IGraphics->Text to write text on the window.
this should allow me to change the text as needed, but raises up some new questions.

The first: how can i set the correct lenght of the text each time i need to change?
second: should i clear the rport each time i write new text?
third: there a way for the IGraphics->Text to accept the newline charcode \n?
fourth: How to change the font and there is a new method for this?

Thank you

salass00
salass00's picture
Offline
Last seen: 1 month 3 days ago
Joined: 2011-02-03 11:27
By setting GA_ReadOnly to

By setting GA_ReadOnly to TRUE, BUTTON_BevelStyle to BVS_NONE and BUTTON_Transparent to TRUE you can create a read-only button.gadget which acts as a label which you can change the text of.

To change the text of the button just call IIntuition->SetGadgetAttrs() with GA_Text.

BUTTON_DomainString can be used to reserve the space you need for your label texts.

jabirulo
jabirulo's picture
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2013-05-30 00:53
You can check too, maybe they

You can check too, maybe they are of some help.
os4depot ReAction examples 1
os4depot ReAction examples 2

AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P

Log in or register to post comments