Hi Omar,

it's a bit confusing, because internally the 'ListParameter' class apppears 
to handle the 'values' with the 'limits' parameter. No guarantees, but this 
should work:

p.param( 'db type').setLimits(['1', '2', '3'])


Cheers
Sebastian



Am Mittwoch, 29. März 2017 20:38:16 UTC+2 schrieb Omar:
>
> Hi all,
>
> I am using pyqtgraph and I really like it. I have a small problem: I have 
> a parameter tree that needs to be modified depending  on user's selection 
> of a combo box
>
>  
> I have this:
>
> par={ {'name': 'db type', 'type':'list','values': 
> ['server','serverless']},{'name': 'CHAN', 'type':'list','values': ['--']}
> p = Parameter.create(name='params', type='group', children=par)
>
>
> if the users select 'server' or 'serverless':
>
> I would like something like this:
>
> if p.child('db type').value()=='server':
>      p.child('CHAN').values=['1','2',''3]
> else:
>      p.child('CHAN').values=['A','B',''C]
>
> so now the user would see the  combo box 'CHAN' with options 1,2,3 or 
> A,B,C. but I cannot find a way to modify the list elements.
>
> I am sure I am missing something but I am stuck with this problem. 
>
> Any feedback is appreciated
>
> Omar
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/9b3fa3ae-b844-4523-af40-368db9613461%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to