PDA

View Full Version : unvisible all labels or images????



santral
12-05-2007, 01:00 PM
I have five image...when I click one it will make visible a label
and when I click another one of five images it will close previous label and make visible new label ...but How ???

for example:for 1. image code=

Label.SetVisible("all Labels (???) ", false);
Label.SetVisible("Label1", true);
for 2. image code=

Label.SetVisible("all Labels (???) ", false);
Label.SetVisible("Label2", true);
all Labels ???

like this code or another codes for my work.....

I suppose you understand me :o
pls help me:huh

azmanar
12-05-2007, 01:19 PM
Hi,

There is no built-in GROUP function for labels, yet.

So, you have to name each label properly. Then specify what will happen to every label when you click something.

Hard work but necessary.

holtgrewe
12-05-2007, 01:43 PM
Check the 'help' for Page.EnumerateObjects().

This will build a table of all objects on the page.
You can then loop through the table and set the Object properties accordingly for the objects which are labels.

santral
12-05-2007, 01:47 PM
thanks for reply...
I can use images instead of labels ...
so which codes I can use ???
actually what is the group names ...I couldnt see them...
for example :

Label.SetVisible("group1", false);
Label.SetVisible("Label1", true);

is it true??? or what :huh

santral
12-05-2007, 02:47 PM
thanks holtgrewe....

I tried but there is no any change.still labels are visible..:huh
Are there any mistake in my codes ->


object_names = Page.EnumerateObjects();
for index, object in object_names do
-- Get the type of the object
type = Page.GetObjectType(object);
if (type == OBJECT_LABEL) then
Label.SetVisible("object", false);
end
end
Label.SetVisible("Label1", true);:huh

Bruce
12-05-2007, 06:11 PM
If I understand you right... Try this.

Dermot
12-05-2007, 06:53 PM
You can't put quotes around a variable becaus eit is just treated as a string then.


object_names = Page.EnumerateObjects();
for index, object in object_names do
-- Get the type of the object
type = Page.GetObjectType(object);
if (type == OBJECT_LABEL) then
Label.SetVisible(object, false);
end
end
Label.SetVisible("Label1", true);

santral
12-06-2007, 05:33 AM
thanks for replies...
so
like Bruce's file
I will write Label.SetVisible("Label", false); for all labels :o
hardwork :lol
but I will make like this ;)

thanks...