ID:831749
 
(See the best response by The Motto.)
I tried :
mob/verb/Stats()
usr<<output("Health","child2")


Problem description:
I don't know how to change the child text.. someone can give me an example how to do this ?
thanks in advance :)

#ZeroDay .
If you mean you want to change the pane displayed in a child control, you use winset(). The output() proc is for things like sending text to output controls and objects to grids.
In response to Kaiochao
Kaiochao wrote:
If you mean you want to change the pane displayed in a child control, you use winset(). The output() proc is for things like sending text to output controls and objects to grids.

Hello Kaiochao,
First of all, Thanks for you're quick reply !
Secondly, can you give me an example ?

And again, Thanks !
In response to ZeroDay
Best response
Here's An Example:
winset(usr,null,"WindowName.child2.text='[Health]'")

Full in WindowName with the real window name. Also I believe Health is a variable and it won't show the value in "" unless you have it "[Health]" otherwise the way you have it, it will just display the word Health.
In response to The Motto
The Motto wrote:
Here's An Example:
> winset(usr,null,"WindowName.child2.text='[Health]'")
>

Full in WindowName with the real window name. Also I believe Health is a variable and it won't show the value in "" unless you have it "[Health]" otherwise the way you have it, it will just display the word Health.
it just won't work..
it tried it like that :
mob/verb/
Stats()
winset(usr,null,"Stats.grid.text='Health: 500'")

winset(usr,"Stats.grid", "text='Health: 500'")


Is what I use (at least similar)
In response to Kyle2120
Kyle2120 wrote:
winset(usr,"Stats.grid", "text='Health: 500'")

Is what I use (at least similar)

still.. it just won't work ! :(
i thought i will solve it alone but i just don't know how to fix it
Stats being the window (or pane), grid being the control ID (like a label)

Did you enter the right ones?
In response to Kyle2120
Kyle2120 wrote:
Stats being the window (or pane), grid being the control ID (like a label)

Did you enter the right ones?

Yes,
as you can see :
http://img515.imageshack.us/img515/4/ e0c0a143a7fa4cf2a7e5ebb.png
We see you have the right Control ID but do You Have the Wright Window ID ?
Grid and child controls don't have a text attribute. Label and button controls do. You need to use output() to output to a specific cell in the grid. Child controls can only contain window panes.

What type of control are you actually using?
In response to DarkCampainger
Yea i was going to suggest that he used an label but i wasnt entirely sure.
In response to DarkCampainger
DarkCampainger wrote:
Grid and child controls don't have a text attribute. Label and button controls do. You need to use output() to output to a specific cell in the grid. Child controls can only contain window panes.

What type of control are you actually using?

Sorry for being Dumb..
but i don't understand what you mean.. :S
In response to ZeroDay
You want to change the child text.
Childs don't have text.
Labels have text.
Use a label to show text instead of a child that can't.
In response to Kaiochao
Kaiochao wrote:
You want to change the child text.
Childs don't have text.
Labels have text.
Use a label to show text instead of a child that can't.

So what child for ?
and how i use HTML in label..?
In response to ZeroDay
Childs contain panes. When you make a new window, you have the option to make it a pane. Panes aren't windows, so they can't move around or be displayed on the screen without using a Child or Tab control.

Labels don't support HTML, so you can't use those. (if you mentioned that earlier, I wouldn't have suggested it) You can style the text, but it will affect all the text inside it.

Outputs probably support enough HTML for what you're doing (although I have no clue what you're doing). You can also make it a one-line output by setting the line limit.

Browsers definitely support HTML, but they might be overkill for what you're doing.

You could also use maptext on a HUD object to show the text on your screen instead of in a skin.

All things considered, I think you should use an output.
In response to Kaiochao
Kaiochao wrote:
Childs contain panes. When you make a new window, you have the option to make it a pane. Panes aren't windows, so they can't move around or be displayed on the screen without using a Child or Tab control.

Labels don't support HTML, so you can't use those. (if you mentioned that earlier, I wouldn't have suggested it) You can style the text, but it will affect all the text inside it.

Outputs probably support enough HTML for what you're doing (although I have no clue what you're doing). You can also make it a one-line output by setting the line limit.

Browsers definitely support HTML, but they might be overkill for what you're doing.

You could also use maptext on a HUD object to show the text on your screen instead of in a skin.

All things considered, I think you should use an output.

i'm trying to do custom tabs displaying..
and what about inventory in labels ? how to do that ?
In response to ZeroDay
Inventories were usually put in a statpanel because it is easy to display lists in a statpanel.

The HUD was also a cool way to do it, but it isn't used as much.

Nowadays, the grid control is an option. You can use output() to send objects to grids.

For more info on how to do anything on BYOND, please stop posting here. Search for the answers yourself.
And if your search fails feel free to start a new post
In response to The Motto
The Motto wrote:
And if your search fails feel free to start a new post

that's what i probly doing always..
in the source i'm a WEB Programmer
well, i solved the problem with grids and i learned finally how to use them :)
so i did something like that :
mob
proc
ChangeInfo(inf)
usr << output(inf,"grid1:1,2")

now the problem is, i got image and i want to remove it from the user, i tried to change the icon state, but i failed .
obj/Selector
icon = 'target.dmi'
icon_state="b"
pixel_y=32
mob
Click()
var/obj/Selector/K = new()
var/image/I = image(K,src)
var/image/IO = image(K,src)
for(var/mob/M in world)
IO.icon_state="none"
usr << I
if(src.client||src.NPC||src==usr||src.log)
usr << I

Should i open new topic ? becuse i fill like a spammer..
Page: 1 2