Read text from one other screen
Posted: Mon Apr 07, 2014 12:30 am
Hello,
I noticed that if I try to access a text belonging to another form I can’t return this text as long as the form does not appear at least once, I'll explain,
if from Screen1 I try to read a text in Screen2 using this code:
In Screen1:
AnalogNumeric.Text = Screen2.getTextPageTitle();
In Screen2:
public partial class Screen2
{
static string pagetitle;
void Screen2_Opened(System.Object sender, System.EventArgs e)
{
pagetitle = this.Title.Text;
}
static public string getTextPageTitle()
{
return pagetitle;
}
}
the text will be returned only after screen2 will be opened at least once, there is a way to have the text always available, or is there a way via script to read text directly from the Multiple languages table?
Thank you very much.
I noticed that if I try to access a text belonging to another form I can’t return this text as long as the form does not appear at least once, I'll explain,
if from Screen1 I try to read a text in Screen2 using this code:
In Screen1:
AnalogNumeric.Text = Screen2.getTextPageTitle();
In Screen2:
public partial class Screen2
{
static string pagetitle;
void Screen2_Opened(System.Object sender, System.EventArgs e)
{
pagetitle = this.Title.Text;
}
static public string getTextPageTitle()
{
return pagetitle;
}
}
the text will be returned only after screen2 will be opened at least once, there is a way to have the text always available, or is there a way via script to read text directly from the Multiple languages table?
Thank you very much.