cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-803092%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EJMP%20%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%3A%20%E5%8B%95%E7%9A%84%E3%83%91%E3%83%8D%E3%83%AB%20%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AE%E5%AD%90%E8%A6%81%E7%B4%A0%E3%81%AB%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9%E3%81%99%E3%82%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-803092%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E3%80%81%3C%2FP%3E%3CP%3E%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%81%8C%E3%83%9C%E3%82%BF%E3%83%B3%E3%81%AE%E3%82%AF%E3%83%AA%E3%83%83%E3%82%AF%E6%99%82%E3%81%AB%E5%BF%85%E8%A6%81%E3%81%AA%E6%95%B0%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AE%E3%83%A9%E3%83%99%E3%83%AB%E3%81%A8%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E7%B7%A8%E9%9B%86%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%E3%81%8C%E5%8B%95%E7%9A%84%E3%81%AB%E4%BD%9C%E6%88%90%E3%81%95%E3%82%8C%E3%82%8B%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E6%9B%B8%E3%81%84%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EtextEditBoxList%20%3D%20%7B%7D%3B%20%20%2F%2F%20global%20variable%3CBR%20%2F%3ELoadSteps%20%3D%20function%20(%7BthisBox%7D%2C%20%7BDefault%20Local%7D%2C%0A%09steps_number%20%3D%20NumberEdit1%20%26lt%3B%26lt%3B%20Get%3B%20%20%20%2F%2F%20get%20number%20of%20items%20from%20number%20edit%20box%0A%09For(i%3D1%2C%20i%26lt%3B%3D%20steps_number%2Ci%2B%2B%2C%0A%09%09textBox%20%3D%20Text%20Box(%22Step%20%3A%20%22%20%7C%7C%20Char(i))%3B%0A%09%09textBox%20%26lt%3B%26lt%3B%20Set%20Width(100)%3B%0A%09%09%0A%09%09textEBox%20%3D%20Text%20Edit%20Box(%20%22Enter%20text%20here...%22)%3B%0A%09%09textEBox%20%26lt%3B%26lt%3B%20Set%20Width(300)%3B%0A%09%09%0A%09%09Insert%20Into(textEditBoxList%2CtextEBox)%3B%0A%09%09print(textEditBoxList)%3B%20%2F%2F%20Its%20always%20empty%0A%09%09%0A%09%09Panel1%20%26lt%3B%26lt%3B%20Append(%0A%09%09%09H%20List%20Box(%0A%09%09%09%09textBox%2C%0A%09%09%09%09textEBox%0A%09%09%09)%0A%09%09)%3B%0A%09)%3B%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%81%93%E3%81%93%E3%81%A7%E3%80%81%E5%88%A5%E3%81%AE%E3%83%9C%E3%82%BF%E3%83%B3%E3%82%92%E3%82%AF%E3%83%AA%E3%83%83%E3%82%AF%E3%81%97%E3%81%A6%E3%80%81%E3%83%91%E3%83%8D%E3%83%AB%20%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AE%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E5%AD%90%E8%A6%81%E7%B4%A0%E3%81%AE%20textEBox%20%E3%81%AE%E5%86%85%E5%AE%B9%E3%81%AB%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%82%B0%E3%83%AD%E3%83%BC%E3%83%90%E3%83%AB%E5%A4%89%E6%95%B0%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%80%81%E3%81%9D%E3%82%8C%E3%82%92%E4%BB%8B%E3%81%97%E3%81%A6%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9%E3%81%97%E3%82%88%E3%81%86%E3%81%A8%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E3%81%93%E3%82%8C%E3%82%92%E5%AE%9F%E7%8F%BE%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E4%BB%A3%E6%9B%BF%E6%96%B9%E6%B3%95%E3%81%BE%E3%81%9F%E3%81%AF%E3%82%88%E3%82%8A%E8%89%AF%E3%81%84%E6%96%B9%E6%B3%95%E3%81%8C%E3%81%82%E3%82%8C%E3%81%B0%E5%8A%A9%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E5%89%8D%E3%82%82%E3%81%A3%E3%81%A6%E6%84%9F%E8%AC%9D%E3%81%97%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-803092%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8B%95%E5%8C%96%E3%81%A8%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-803132%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20JMP%20%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%3A%20%E5%8B%95%E7%9A%84%E3%83%91%E3%83%8D%E3%83%AB%20%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AE%E5%AD%90%E8%A6%81%E7%B4%A0%E3%81%AB%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9%E3%81%99%E3%82%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-803132%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EXPath%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E7%B7%A8%E9%9B%86%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%EF%BC%88%E3%81%BE%E3%81%9F%E3%81%AF%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%EF%BC%89%E3%81%B8%E3%81%AE%E5%8F%82%E7%85%A7%E3%81%AE%E3%83%AA%E3%82%B9%E3%83%88%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E3%81%8B%E3%80%81%E3%81%BE%E3%81%9F%E3%81%AF%E3%81%82%E3%81%AA%E3%81%9F%E3%81%8C%E8%A1%8C%E3%81%A3%E3%81%A6%E3%81%84%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%83%AA%E3%82%B9%E3%83%88%E3%82%92%E5%88%A9%E7%94%A8%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0Anw%20%3D%20New%20Window(%22%22%2C%20%0A%09panel1%20%3D%20Lineup%20Box(N%20Col(2))%0A)%3B%0A%0Asteps_number%20%3D%203%3B%0AtextEditBoxList%20%3D%20%7B%7D%3B%0A%0AFor(i%20%3D%201%2C%20i%20%26lt%3B%3D%20steps_number%2C%20i%2B%2B%2C%0A%09textBox%20%3D%20Text%20Box(%22Step%20%3A%20%22%20%7C%7C%20Char(i))%3B%0A%09textBox%20%26lt%3B%26lt%3B%20Set%20Width(100)%3B%0A%09%0A%09textEBox%20%3D%20Text%20Edit%20Box(%22Enter%20text%20here...%22)%3B%0A%09textEBox%20%26lt%3B%26lt%3B%20Set%20Width(300)%3B%0A%09%0A%09Insert%20Into(textEditBoxList%2C%20textEBox)%3B%0A%09%0A%09Panel1%20%26lt%3B%26lt%3B%20Append(H%20List%20Box(textBox%2C%20textEBox))%3B%0A)%3B%0A%0Atebs%20%3D%20panel1%20%26lt%3B%26lt%3B%20XPath(%22%2F%2FTextEditBox%22)%3B%0A%0Ashow(tebs%2C%20textEditBoxList)%3B%0A%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
ComplexNerd
Level III

JMP Application : access dynamic panel box child elements

Hi,

i am writing a app code which will dynamically create a textbox label and text edit box when user specifies how many is needed on button click

textEditBoxList = {};  // global variable
LoadSteps = function ({thisBox}, {Default Local}, steps_number = NumberEdit1 << Get; // get number of items from number edit box For(i=1, i<= steps_number,i++, textBox = Text Box("Step : " || Char(i)); textBox << Set Width(100); textEBox = Text Edit Box( "Enter text here..."); textEBox << Set Width(300); Insert Into(textEditBoxList,textEBox); print(textEditBoxList); // Its always empty Panel1 << Append( H List Box( textBox, textEBox ) ); ); );

Now on another button click i want to access the contents of textEBox of all child elements of panel box.

i tried creating a global variable and accessing through it but dosent work. any alternative or better way to achieve this would be helpful.

 

Thanks in advance

 

 

 

1 REPLY 1
jthi
Super User

Re: JMP Application : access dynamic panel box child elements

Either use XPath to get a list of references to a Text Edit Box (or text box) or utilize a list like you are doing

Names Default To Here(1);

nw = New Window("", 
	panel1 = Lineup Box(N Col(2))
);

steps_number = 3;
textEditBoxList = {};

For(i = 1, i <= steps_number, i++,
	textBox = Text Box("Step : " || Char(i));
	textBox << Set Width(100);
	
	textEBox = Text Edit Box("Enter text here...");
	textEBox << Set Width(300);
	
	Insert Into(textEditBoxList, textEBox);
	
	Panel1 << Append(H List Box(textBox, textEBox));
);

tebs = panel1 << XPath("//TextEditBox");

show(tebs, textEditBoxList);

-Jarmo