[Scilab-users] Matrix of strings and grid

Samuel Gougeon sgougeon at free.fr
Sun Jul 15 16:18:03 CEST 2018


Le 15/07/2018 à 09:49, ludovic.wagner67 at gmail.com a écrit :
> Hello,
>
> Thanks for your replies. Sure, listboxes give great results where there is
> only one column even if I believe it would be possible to link several
> listboxes with callback. Is it possible to colour entire background
> (differently for each lines) instead of having the small square?

Here is an example of scrollable table displayed in a figure:

nl  =  500;
t  =  [(1:nl)'  grand(nl,10,"uin",  -1e4,  1e4)];
t  =  strsubst(justify(string(t),"r"),""," ");
t  =  "<td>"  +  t  +  "</td>";
t  =  [emptystr(t(:,1))+"<tr"  t  emptystr(t(:,1))+"</tr>"];
t(1:2:$,1)  =  t(1:2:$,1)  +  "bgcolor=''#FFF6D6''>";
t(2:2:$,1)  =  t(2:2:$,1)  +  ">";
t  =  "<html>"  +  ..
     "<table style=''font-family:Monospaced'' cellpadding=''1''>"  +  ..
     strcat(t,"","c")  +  ..
     "</table>";

clf
p  =  [10  10  550  300];
Listbox  =  uicontrol(gcf(),  "style","listbox",  "string",t,  "position",p);



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180715/6edeb831/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jakojngddeghkblf.png
Type: image/png
Size: 52484 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20180715/6edeb831/attachment.png>


More information about the users mailing list