Profile Picture

Text of shape label

Posted By Cristianf 10 Years Ago
Author
Message
Cristianf
Question Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 14, Visits: 24
Hi all,

I can't display text property of a label which is not set as default in a shape.

With label set to "DefaultLabel" I do this:
            var example = shape.Labels.DefaultLabel;
            textbox.Text = example.Text;

But when I have 3-4 labels and I want to get let's say the "Text" of the second label I use "GetChildByName". The problem is that it doesn't show me "Text" property, my code:
            var example = shape.Labels.GetChildByName("SecondLabel");
            textbox.Text = ìexample.Text); <--- Text doesn't exist here...

Any hint to solve this?
Thanks



Nevron Support
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
First it looks like the label reference is stored in var example, while later in your code you use iexample
Second - are you sure that a label with name SecondName is added to the labels collection?


Best Regards,
Nevron Support Team



Cristianf
Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 14, Visits: 24
I use var "example", iexample was a my typing mistake, and yes I've added the label. I found a solution to my problem setting the label on which I work temporarily as default...




Similar Topics


Reading This Topic