Thread Subject: uitable and text

Subject: uitable and text

From: Travis

Date: 30 Jun, 2009 18:23:01

Message: 1 of 7

I cannot for the life of me figure out how to get a uitable, in guide, to accept text inputs. Could someone help me out?

Subject: uitable and text

From: Nathan

Date: 30 Jun, 2009 19:53:21

Message: 2 of 7

On Jun 30, 11:23 am, "Travis " <sinuso...@hotmail.com> wrote:
> I cannot for the life of me figure out how to get a uitable, in guide, to accept text inputs.  Could someone help me out?

Hint:
set(handles.uitable1,'Data',[1,2,3;4,5,6])

Subject: uitable and text

From: Travis

Date: 30 Jun, 2009 22:15:05

Message: 3 of 7

Nathan <ngreco32@gmail.com> wrote in message <b6829168-5668-4364-ac1d-c540d4f68c1c@n16g2000yqm.googlegroups.com>...
> On Jun 30, 11:23?am, "Travis " <sinuso...@hotmail.com> wrote:
> > I cannot for the life of me figure out how to get a uitable, in guide, to accept text inputs. ?Could someone help me out?
>
> Hint:
> set(handles.uitable1,'Data',[1,2,3;4,5,6])

That puts numbers in the table. I need to get strings in it, or at least the ability to have 08976 not converted to 8976.

Subject: uitable and text

From: Nathan

Date: 30 Jun, 2009 22:23:31

Message: 4 of 7

On Jun 30, 3:15 pm, "Travis " <sinuso...@hotmail.com> wrote:
> Nathan <ngrec...@gmail.com> wrote in message <b6829168-5668-4364-ac1d-c540d4f68...@n16g2000yqm.googlegroups.com>...
> > On Jun 30, 11:23?am, "Travis " <sinuso...@hotmail.com> wrote:
> > > I cannot for the life of me figure out how to get a uitable, in guide, to accept text inputs. ?Could someone help me out?
>
> > Hint:
> > set(handles.uitable1,'Data',[1,2,3;4,5,6])
>
> That puts numbers in the table.  I need to get strings in it, or at least the ability to have 08976 not converted to 8976.

In that case, make it a cell array?

set(handles.uitable1,'Data',{'hello';'world'})

Subject: uitable and text

From: Travis

Date: 30 Jun, 2009 23:02:01

Message: 5 of 7

Nathan <ngreco32@gmail.com> wrote in message <4f5e5fcb-4624-4605-8d3e-d7fd7f1ec214@n16g2000yqm.googlegroups.com>...
> On Jun 30, 3:15?pm, "Travis " <sinuso...@hotmail.com> wrote:
> > Nathan <ngrec...@gmail.com> wrote in message <b6829168-5668-4364-ac1d-c540d4f68...@n16g2000yqm.googlegroups.com>...
> > > On Jun 30, 11:23?am, "Travis " <sinuso...@hotmail.com> wrote:
> > > > I cannot for the life of me figure out how to get a uitable, in guide, to accept text inputs. ?Could someone help me out?
> >
> > > Hint:
> > > set(handles.uitable1,'Data',[1,2,3;4,5,6])
> >
> > That puts numbers in the table. ?I need to get strings in it, or at least the ability to have 08976 not converted to 8976.
>
> In that case, make it a cell array?
>
> set(handles.uitable1,'Data',{'hello';'world'})

wow, works well, one of the few things I did not try. Now the problem is that doing that sets the table to only 2 rows long, and I would like at least 100. Do I need to do the same thing and just make ' ';' ' 100 times? I have tried sertting it to cell(100,2), but that does not allow text.

Subject: uitable and text

From: Nathan

Date: 30 Jun, 2009 23:11:13

Message: 6 of 7

On Jun 30, 4:02 pm, "Travis " <sinuso...@hotmail.com> wrote:
> Nathan <ngrec...@gmail.com> wrote in message <4f5e5fcb-4624-4605-8d3e-d7fd7f1ec...@n16g2000yqm.googlegroups.com>...
> > On Jun 30, 3:15?pm, "Travis " <sinuso...@hotmail.com> wrote:
> > > Nathan <ngrec...@gmail.com> wrote in message <b6829168-5668-4364-ac1d-c540d4f68...@n16g2000yqm.googlegroups.com>...
> > > > On Jun 30, 11:23?am, "Travis " <sinuso...@hotmail.com> wrote:
> > > > > I cannot for the life of me figure out how to get a uitable, in guide, to accept text inputs. ?Could someone help me out?
>
> > > > Hint:
> > > > set(handles.uitable1,'Data',[1,2,3;4,5,6])
>
> > > That puts numbers in the table. ?I need to get strings in it, or at least the ability to have 08976 not converted to 8976.
>
> > In that case, make it a cell array?
>
> > set(handles.uitable1,'Data',{'hello';'world'})
>
> wow, works well, one of the few things I did not try.  Now the problem is that doing that sets the table to only 2 rows long, and I would like at least 100.  Do I need to do the same thing and just make ' ';' ' 100 times?  I have tried sertting it to cell(100,2), but that does not allow text.

Yeah, the table will actually conform to whatever dimensions you have
in your 'Data'. If your 'Data' is huge, there will be scroll bars
(depending on the size you originally made the table to be).
Mess around with it a bit.
If you set data as {'h','e','l','l','o';'w','o','r','l','d'} you will
have six columns and two rows (unless I have them backwards.. but you
get what I mean).

Good luck!
Glad I could help.
-Nathan

Subject: uitable and text

From: Travis

Date: 30 Jun, 2009 23:24:01

Message: 7 of 7

Nathan <ngreco32@gmail.com> wrote in message <3e770b94-4c1c-4f51-9904-0bbdf7bf7f77@y9g2000yqg.googlegroups.com>...
> On Jun 30, 4:02?pm, "Travis " <sinuso...@hotmail.com> wrote:
> > Nathan <ngrec...@gmail.com> wrote in message <4f5e5fcb-4624-4605-8d3e-d7fd7f1ec...@n16g2000yqm.googlegroups.com>...
> > > On Jun 30, 3:15?pm, "Travis " <sinuso...@hotmail.com> wrote:
> > > > Nathan <ngrec...@gmail.com> wrote in message <b6829168-5668-4364-ac1d-c540d4f68...@n16g2000yqm.googlegroups.com>...
> > > > > On Jun 30, 11:23?am, "Travis " <sinuso...@hotmail.com> wrote:
> > > > > > I cannot for the life of me figure out how to get a uitable, in guide, to accept text inputs. ?Could someone help me out?
> >
> > > > > Hint:
> > > > > set(handles.uitable1,'Data',[1,2,3;4,5,6])
> >
> > > > That puts numbers in the table. ?I need to get strings in it, or at least the ability to have 08976 not converted to 8976.
> >
> > > In that case, make it a cell array?
> >
> > > set(handles.uitable1,'Data',{'hello';'world'})
> >
> > wow, works well, one of the few things I did not try. ?Now the problem is that doing that sets the table to only 2 rows long, and I would like at least 100. ?Do I need to do the same thing and just make ' ';' ' 100 times? ?I have tried sertting it to cell(100,2), but that does not allow text.
>
> Yeah, the table will actually conform to whatever dimensions you have
> in your 'Data'. If your 'Data' is huge, there will be scroll bars
> (depending on the size you originally made the table to be).
> Mess around with it a bit.
> If you set data as {'h','e','l','l','o';'w','o','r','l','d'} you will
> have six columns and two rows (unless I have them backwards.. but you
> get what I mean).
>
> Good luck!
> Glad I could help.
> -Nathan

You have been a great help, thank you.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
guide Travis 30 Jun, 2009 14:24:08
uitable Travis 30 Jun, 2009 14:24:08
text Travis 30 Jun, 2009 14:24:08
string Travis 30 Jun, 2009 14:24:08
rssFeed for this Thread

Contact us at files@mathworks.com