XLNT help with label

Blitz3D Forums/Blitz3D Beginners Area/XLNT help with label

Hi, have looked at the forums for XLNT UI but decided not to post there as hardly anybody has posts this year.

I have a label on a window and named it lblTilenumber, if I want to change the text do I do the following as it doesnt work?

T$="tile:" +tileindex +"/"+ maxtiles
GUI_SetText(txtTilenumber,t$)

thanks
Graham

Use lblTilenumber instead of txtTilenumber:

GUI_SetText(lblTilenumber,t$)

thanks but the above is my mistake, a typo !

The code has the correct lblTilenumber both as the name for the label and as a parameter to the function but it still doesnt work.

Any more ideas please?

Global lblTilenumber?
(if you create label in function)

Here's sample code that works for me:

Include "XSTART.BB"

Graphics 800, 600, 16, 2

GUI_GFXSETUP()

MyWin=GUI_WINDOW( -1,-1, 400,200, "Label Test" )

lblTileNumber = GUI_label( MyWin, 50,100, 100,20, "this text will be replaced" )
T$ = "tile:" + tileindex + "/" + maxtiles
GUI_SetText( lblTilenumber, t$ )

GUI_OPENWIN( MyWin )

Repeat
	SetBuffer BackBuffer() : Cls
	GUI()
	Flip
Until EV_WIN_CLOSE( MyWin ) Or KeyDown( 1 )

If this works for you, Graham, then it may be a scope problem as Mikele suggests. If it doesn't work, then...? (Oh, and you are talking about XLnt ii, right?)

thats it ! thanks a lot all

the prob was due to the objects not being declared global .

Yes and I have xlnt 2 !