|
From: william G. <gun...@gm...> - 2010-03-12 10:12:32
|
def on_initialize(self, event):
l=['1','2','3']
self.components.List1.clear()
for i in l:
print i
#self.components.List1.clear()
self.components.List1.append(i)
I figured it out:
if its just going to console: l=[1,2,3] works fine
but to append to the list component it: l=['1','2','3']
But thanks for the quick response anyways.
Thank you
William Gunnells
* 918-830-7300
* cell 918-615-2397
* gun...@gm...
* co...@qi...
On Thu, Mar 11, 2010 at 3:10 PM, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX wrote:
>
>
> On 10/3/10 23:24, william Gunnells wrote:
>>
>> I know I'm butchering thel list component. Could someone provide an exmple
>> as you can see below I can print the list but not add it to List1
>> =name type=List
>> I though I understood: but evidently not.
>>
>> def on_initialize(self, event):
>> l=[1,2,3]
>> for i in l:
>> print i
>> self.components.List1.InsertItem(i)
>> self.update()
>> #self.components.List1.stringSelection(i)
>>
>
> You should be able to use append(i) instead of InsertItem(i) to add items to
> the list control.
>
> --
> XXXXXXXXXXX
>
>
|