anchor.diff:  			      end,
   			      [{0,Name}, {1,Size}, {2, Memory div 1024},
   			       {3,Owner}, {4,RegName}, {5,Id}]),
  -		Row + 1
  +                if SelName =:= Name, SelId =:= Id ->
  +                        wxListCtrl:setItemState(Grid, Row, 16#FFFF, ?wxLIST_STATE_SELECTED),
  +                        {Row+1, Row};
  +                   true ->
  +                        wxListCtrl:setItemState(Grid, Row, 0, ?wxLIST_STATE_SELECTED),
  +                        {Row+1, Sel}
  +                end
   	end,
       ProcInfo = case Dir of
   		   false -> lists:reverse(lists:keysort(Sort, Tables));
   		   true -> lists:keysort(Sort, Tables)
   	       end,
  -    lists:foldl(Update, 0, ProcInfo),
  -    ProcInfo.
  +    {_, Sel} = lists:foldl(Update, {0, undefined}, ProcInfo),
  +    {ProcInfo, Sel}.
  +
  +sel(#state{selected=Sel, tabs=Tabs}) ->
  +    try lists:nth(Sel+1, Tabs) of
  +        #tab{name=Name, id=Id} -> {Name, Id}
  +    catch _:_ ->
  +            {undefined, undefined}
  +    end.
  
positive.code: 	    self() ! Error,
  	    {noreply, State};
  	Tables ->
  	    Tabs = update_grid(Grid, Opt, Tables),
  	    wxWindow:setFocus(Grid),
  	    {noreply, State#state{opt=Opt, tabs=Tabs}}
      end;
  
  handle_event(#wx{event=#wxSize{size={W,_}}},  State=#state{grid=Grid}) ->
  
negative.code: list_to_strings([A|B]) ->
      integer_to_list(A) ++ " ," ++ list_to_strings(B).
  
  update_grid(Grid, Selected, Opt, Tables) ->
      wx:batch(fun() -> update_grid2(Grid, Selected, Opt, Tables) end).
  
  update_grid2(Grid, {SelName,SelId}, #opt{sort_key=Sort,sort_incr=Dir}, Tables) ->
      wxListCtrl:deleteAllItems(Grid),
      Update =
  	fun(#tab{name = Name, id = Id, owner = Owner, size = Size, memory = Memory,
  		 protection = Protection, reg_name = RegName},
              {Row, Sel}) ->
  		_Item = wxListCtrl:insertItem(Grid, Row, ""),
  		if (Row rem 2) =:= 0 ->
  			wxListCtrl:setItemBackgroundColour(Grid, Row, ?BG_EVEN);
  