Thanks, Clint. And I was wrong about SELECTION_CHANGED_EVENT not being
available to ivib.
Steve
---
The method Jafar gave me was "get_string_selection". I'm wondering if the
On Tue, Feb 15, 2011 at 12:46 PM, Clinton Jeffery <jeff...@cs.uidaho.edu>wrote:
> Jafar,
>
> Thanks for answering Steve's question. Method get_selection() gives an the
> position in the list while get_string_select() gives the list element
> contents. Either will work for most folks, but I like your recommendation.
>
> With SELECTION_KEY_EVENT I would note that if you look at the event's
> contents (probably its "code" field) you can certainly ignore motion
> events... But if SELECTION_CHANGED_EVENT gives Steve what he wants, it is
> probably better than SELECTION_KEY_EVENT.
>
> Cheers,
> Clint
>
> On Tue, Feb 15, 2011 at 10:35 AM, Jafar Al-Gharaibeh
> <to.ja...@gmail.com>wrote:
>
>> Hi Steve,
>>
>> I'm not sure which selection list you are using, I will assume it is
>> List(). here are some code fragment that do the trick.
>>
>> list_1 := List()
>> list_1.connect(self, "on_list_handler", SELECTION_CHANGED_EVENT)
>> list_1.set_selection_list(["1", "2", "3", "4"])
>>
>> and here is the event handler
>>
>> method on_list_handler(ev)
>> write("Selection")
>> write(list_1.get_string_selection())
>> end
>>
>> get_string_selection() will get the selected item. There are other
>> functions that serve other purposes. Make sure to use the event
>> SELECTION_CHANGED_EVENT if you want the code to execute whenever there is a
>> change on the selection.
>>
>> On Tue, Feb 15, 2011 at 9:15 AM, Steve Graham <
>> solitary.wandere...@gmail.com> wrote:
>>
>>> I'm trying my hand at a windows app and I've set up 2 selection lists in
>>> ivib. For each list's event, I chose SELECTION_KEY_EVENT. And what I'd
>>> like to happen is when the user chooses from a selection list, I would like
>>> to capture which entry they chose. Not knowing how to do that, I changed
>>> the method to simply print which list # was selected. When I moved the
>>> cursor over the list without pressing any key, the method would fire.
>>>
>>> Any ideas how I can capture the entry selected?
>>>
>>
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group