Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

How to add text to column by using UIBLOCK List's add button?

 

 

Hi everyone,

 

I am currently working some method with C#, but I am not have many experience on programing, now got problem for sure.

 

quentions are below:

 

When I using List block from UIBLOCK, joing the add button and connecting the SeedfileDlx.

 

And I know if I want to add some text to column by using the add button, need to edit some code in the AddCallBack on C#.

 

Q1. What return value should I give in AddCallback?

 

       here is my code:

 

    public int AddCallback (NXOpen.BlockStyler.SetList set_list)
{
string[] jj = new string[] { "22", "11", "33", "55", "55" };
set_list.SetItemText(list0,jj);

 

return ;
}

 

I don't know what method I shoud use or if it's correct(I try so many method,ex :  SetString(),AddNewSet()... etc.). Because the UIBLOCK is not like WindosForm that i can't use the same way to edit the list.

 

I was stuck on this problem for a weeks.

 

If someone can help solve this problem, I would be very grateful.

 

best regards,

 

Dean

 

 

2 REPLIES
Solution
Solution
Accepted by topic author uccblackk
‎06-06-2016 02:56 AM

Re: How to add text to column by using UIBLOCK List's add button?

Not sure if you need a simple listbox or you need the setlist.

 

If you need the setlist, there is an example on solution center that demonstrates use of SetList.

 

 

https://solutions.industrysoftware.automation.siemens.com/view.php?sort=desc&q=setlist&dt=nx-api&fil... 

 

 

Re: How to add text to column by using UIBLOCK List's add button?

thanks, the update_cb of example helps a lot!