GUI List Box Question

  • Follow


I'm writing a GUI where I have some locations that I'm importing from Excel.  These locations then populate a list box based on which data set i choose to list.

What I want to do is get the locations from the first list box (select the locations that I want) and move them to another list box within the same GUI screen. (and of course remove in case i make the wrong selection).  I am quite stuck.

Is there maybe some sample code that could be provided or any insight into this?

Thanks, 
Justin
0
Reply Justin 1/27/2011 7:48:03 PM

On Jan 27, 2:48=A0pm, "Justin " <threejz8_2...@yahoo.com> wrote:
> I'm writing a GUI where I have some locations that I'm importing from Exc=
el. =A0These locations then populate a list box based on which data set i c=
hoose to list.
>
> What I want to do is get the locations from the first list box (select th=
e locations that I want) and move them to another list box within the same =
GUI screen. (and of course remove in case i make the wrong selection). =A0I=
 am quite stuck.
>
> Is there maybe some sample code that could be provided or any insight int=
o this?
>
> Thanks,
> Justin

Use the set() and get() commands.  Get the string and value properties
of the first listbox, and set the string property of the second one.
0
Reply ImageAnalyst 1/27/2011 7:50:24 PM


"Justin" wrote in message <ihsi5j$f2p$1@fred.mathworks.com>...
> I'm writing a GUI where I have some locations that I'm importing from Excel.  These locations then populate a list box based on which data set i choose to list.
> 
> What I want to do is get the locations from the first list box (select the locations that I want) and move them to another list box within the same GUI screen. (and of course remove in case i make the wrong selection).  I am quite stuck.
> 
> Is there maybe some sample code that could be provided or any insight into this?
> 
> Thanks, 
> Justin

hi,
u may use the set() and get() properties of the GUI and also the xlsread() and 
xlswrite() function as per your requirement. but while extracting from or writing the contents onto the excel sheet, make sure it is closed.

--
ashutosh srivastava
0
Reply ashutosh 1/28/2011 4:28:04 AM

"Justin" wrote in message <ihsi5j$f2p$1@fred.mathworks.com>...
> I'm writing a GUI where I have some locations that I'm importing from Excel.  These locations then populate a list box based on which data set i choose to list.
> 
> What I want to do is get the locations from the first list box (select the locations that I want) and move them to another list box within the same GUI screen. (and of course remove in case i make the wrong selection).  I am quite stuck.
> 
> Is there maybe some sample code that could be provided or any insight into this?
> 
> Thanks, 
> Justin


Justin:

did you ever figure out how to populate your listbox with items from an excel sheet? I am trying to do the same thing now. 

If so, can you provide any code?

Thanks,
0
Reply ericjaycorbett (113) 6/21/2011 10:06:05 PM

3 Replies
555 Views

(page loaded in 0.049 seconds)

Similiar Articles:













7/25/2012 1:40:56 AM


Reply: