For Programmers: Free Programming Magazines  


Home > Archive > Matlab > October 2006 > How to write CELLArray to ToolTipString









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to write CELLArray to ToolTipString
ias

2006-10-31, 8:02 am

I have a cell array (nx2) of strings in the follwoing form and I want
to assign it as the tooltipstring of a uicontrol using sprintf. Any
ideas how to do it?

cc = {
'#' 'Value'
'1' '10'
'2' '22'
'3' '44'
.. .
.. .
.. '
}

Regards

Fangjun Jiang

2006-10-31, 7:11 pm

cd=cc';
str=sprintf('''%s'' ''%s''\n' ,cd{:});
str(end)='';

ias wrote:
>
>
> I have a cell array (nx2) of strings in the follwoing form and I
> want
> to assign it as the tooltipstring of a uicontrol using sprintf. Any
> ideas how to do it?
>
> cc = {
> '#' 'Value'
> '1' '10'
> '2' '22'
> '3' '44'
> . .
> . .
> . '
> }
>
> Regards
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com