Page 1 of 1

Selected language and screen update

Posted: Fri Mar 13, 2020 1:45 am
by IXdevUser
Hi,

I have 2 questions about the scripting feature of ix dev.

I have 4 languages in my project. I need to recognize the selected language, based on that some information on the screen is changing. How to get the status of current languages?


The screen does not change on a single click?
when I click the button the first time, only the tags value is changing. i have to click again to change the font color?

Code: Select all

		private void highlight_selected ()
		{
		// change button font color
		but_pump1.FontColor = new BrushCF(Color.Black);
		but_pump2.FontColor = new BrushCF(Color.Black);
		but_auto.FontColor = new BrushCF(Color.Red);
	        this.Refresh();
			
		}
	
	
		void butt_Click(System.Object sender, System.EventArgs e)
		{
			Globals.Tags.TEST_TAG.Value = 2;
			highlight_selected();
		}
		

Re: Selected language and screen update

Posted: Thu Mar 26, 2020 12:00 pm
by Russ C.
You can assign a tag to determine which Language is currently selected under Multiple Languages -> Languages tab -> Settings.

I created a tag called My_Current_Language_Tag and assigned below:
language_settings.png
language_settings.png (22.96 KiB) Viewed 7276 times
And it references this index number:
language_index.png
language_index.png (15.67 KiB) Viewed 7276 times
As for your code, does it work for you if you run or simulate on a PC?