Re: undocumented feature: TableView
- To: mathgroup at smc.vnet.net
- Subject: [mg103841] Re: undocumented feature: TableView
- From: David Reiss <dbreiss at gmail.com>
- Date: Fri, 9 Oct 2009 07:14:43 -0400 (EDT)
- References: <hakjjr$d4v$1@smc.vnet.net>
Clearly a function in the midst of the development process and probably not quite ready for prime time. It may vanish or be renamed in afuture version ... In[3]:= Unprotect[TableView] Out[3]= {"TableView"} In[4]:= ?? TableView System`TableView Attributes[TableView]={ReadProtected} Options[TableView]:={Background->None,BaseStyle->{},DefaultBaseStyle- >TableView,DefaultLabelStyle->TableViewLabel,FrameStyle->GrayLevel [0.85],ContentSize->Automatic,ItemSize->10,LabelStyle->{},RotateLabel- >False,Spacings->Automatic,TableHeadings->{Automatic,Automatic}} In[5]:= ClearAttributes[TableView, ReadProtected] In[10]:= ?? TableView System`TableView BoxForm`OptionsCache[TableView]^:={Background->None,BaseStyle-> {},DefaultBaseStyle->TableView,DefaultLabelStyle- >TableViewLabel,FrameStyle->GrayLevel[0.85],ContentSize- >Automatic,ItemSize->10,LabelStyle->{},RotateLabel->False,Spacings- >Automatic,TableHeadings->{Automatic,Automatic}} MakeBoxes[BoxForm`a_TableView,BoxForm`fmt_]^:=BoxForm`MakeRowBoxes [BoxForm`a,BoxForm`fmt]/;Refresh[BoxForm`UseTextFormattingQ,None] MakeBoxes[TableView[],BoxForm`fmt_]^:=With[{TableView`m=ConstantArray [Null,{10,4}]},MakeBoxes[TableView[TableView`m],BoxForm`fmt]] MakeBoxes[TableView[TableView`dims:{_Integer,_Integer}],BoxForm`fmt_] ^:=With[{TableView`m=ConstantArray[Null,TableView`dims]},MakeBoxes [TableView[TableView`m],BoxForm`fmt]] MakeBoxes[TableView[TableView`data_List,BoxForm`opts___],BoxForm`fmt_] ^:=With[{TableView`boxid=TableView`boxidValue [BoxForm`opts],TableView`headings=TableView`headingsValue [BoxForm`opts],TableView`showtypes=TableView`showTypesValue [BoxForm`opts],TableView`resizeable=TableView`resizeableQ [BoxForm`opts],TableView`size=ContentSize/.Flatten [{BoxForm`opts,Options[TableView]}]},((((TagBox [#1,TableView`TableViewTag[BoxForm`opts],BoxID- >TableView`boxid,DefaultBaseStyle->TableView]&)[ToBoxes [#1,BoxForm`fmt]]&)[Deploy[EventHandler[#1, {{MenuCommand,NewRow}:>TableView`NewRowColumnEvent [TableView`boxid,ButtonNotebook[],row], {MenuCommand,NewColumn}:>TableView`NewRowColumnEvent [TableView`boxid,ButtonNotebook[],column], {MenuCommand,Copy}:>TableView`CopyEvent[TableView`boxid,ButtonNotebook []]}]]]&)[Panel[Pane[#1,Sequence@@FilterRules[{BoxForm`opts},Options [Pane]],ImageSize->TableView`size,ImageSizeAction- >Scrollable,Scrollbars->If[TableView`resizeable,Automatic,False]]]]&) [Grid[TableView`addHeadings[Map [RawBoxes,TableView`dataToTableViewGridBoxContent [TableView`data,TableView`showtypes], {2}],TableView`boxid,TableView`headings,BoxForm`opts],Sequence@@FilterRules [{BoxForm`opts},Options[Grid]],ItemSize->{10,1.2},Background- >White,Frame->All,FrameStyle->LightGray,Alignment->Left,DefaultElement- >TemplateBox[{\[Placeholder]},TableViewItem],DefaultBaseStyle-> {TableViewGrid,Deployed->False}]]]/;FreeQ[PadRight[Dimensions [Unevaluated[TableView`data]],2,0],0] Options[TableView]:={Background->None,BaseStyle->{},DefaultBaseStyle- >TableView,DefaultLabelStyle->TableViewLabel,FrameStyle->GrayLevel [0.85],ContentSize->Automatic,ItemSize->10,LabelStyle->{},RotateLabel- >False,Spacings->Automatic,TableHeadings->{Automatic,Automatic}} On Oct 8, 7:49 am, Guido Tripaldi <gu... at gtripaldi.it> wrote: > Hello, > > today I typed by accident "TableView" instead of "TableForm" writing a = > notebook, so I discovered a function apparently not documented in > Mathematica 7 / Mac version. "TableView" displays a list in a > spreadsheet-like format. I tried to search the DocumentationCenter > without finding any information, neither Google nor Wolfram search > engine gave better results. The only documentation I found was using > the "Information - (??)" command. It show the options that TableView = > accepts. > > It appears to be very useful, as it introduces a more flexible way to > observing the data. There are infact some data editing features > accessible through a popup menu (a "+" icon on the top left of the > view) and others ctrl-clicking the view (ctrl-click on Mac; right- > click on Windows). > > Perhaps it is a new feature being finalized that will be included in > next version. Someone maybe knows something more about this function? > > In[1]:= mylist = Table[ Subscript[a, i, j], {i, 5}, {j, 3} ] = > (* a little matrix *) > > In[2]:= mylist // TableView (* show it as a small spread= sheet > *) > > In[3]:= ?? TableView > System`TableView > Attributes[TableView] = {Protected, ReadProtected} > > Options[TableView] := {Background -> None, BaseStyle -> {}, > DefaultBaseStyle -> "TableView", DefaultLabelStyle -> > "TableViewLabel", > FrameStyle -> GrayLevel[0.85], ContentSize -> Automatic, = > ItemSize -> 10, > LabelStyle -> {}, RotateLabel -> False, Spacings -> Automa= tic, > TableHeadings -> {Automatic, Automatic}} > > Guido