Page 1 of 1

Read Text Liabrary

Posted: Wed Mar 28, 2012 6:39 am
by umesh.patil
hi

I am using t7a. I want to add Text Library Texts in to List box or combo box. It should show the list of text from Groups in Text Library in combo or list box. how to do this.


Thanks
Umesh patil

Re: Read Text Liabrary

Posted: Wed Mar 28, 2012 8:35 am
by mark.monroe
You can not link a Text Library to a List box, you can with a Combo Box. If you want to create dynamic text with a List box you will need to do it through code. Here is an example that fills a List box with some values when the Screen opens. You would just need to change those values based on the value of a Tag.

Code: Select all

    public partial class Screen1
    {			
		void Screen1_Opened(System.Object sender, System.EventArgs e)
		{
			for(int i=0;i<5;i++){ 				
				ListBox1.Items.Add("Count " + i.ToString());				
			}
		}			
		void ListBox1_MouseDown(System.Object sender, System.Windows.Forms.MouseEventArgs e)
		{
			Globals.Tags.Tag1.Value = ListBox1.SelectedIndex;
		}		
    }
To link a ComboBox to a Text Library create a combo box and double click it. Then go to the Dynamics tab and click general. Then go to the Text section and there you can select what Text Library you want to use.
double_click_combo.png
double_click_combo.png (170.33 KiB) Viewed 8925 times
DynamicsGeneral.png
DynamicsGeneral.png (135.9 KiB) Viewed 8925 times

Re: Read Text Liabrary

Posted: Fri Feb 16, 2018 12:40 am
by flubb
Has this been changed?
Tried to make a combobox, and then go to dynamic-general, but the "Text" property isnt there.