aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_tv_table.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-11-24 13:33:24 +0100
committerDan Gudmundsson <[email protected]>2011-11-25 10:40:20 +0100
commite7a2f0d7228d8933ee55bdb18fb01a1b19c078a7 (patch)
tree033e64da4a0b42e7665b1bb55f9e711ce5b56d0b /lib/observer/src/observer_tv_table.erl
parentd7eaea0d44fac1f0c67d67c188d6a635b0a4da4c (diff)
downloadotp-e7a2f0d7228d8933ee55bdb18fb01a1b19c078a7.tar.gz
otp-e7a2f0d7228d8933ee55bdb18fb01a1b19c078a7.tar.bz2
otp-e7a2f0d7228d8933ee55bdb18fb01a1b19c078a7.zip
[observer] Fix listctrl colum size calculation
Diffstat (limited to 'lib/observer/src/observer_tv_table.erl')
-rw-r--r--lib/observer/src/observer_tv_table.erl9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/observer/src/observer_tv_table.erl b/lib/observer/src/observer_tv_table.erl
index 7b5cdb44b9..dea3526a8b 100644
--- a/lib/observer/src/observer_tv_table.erl
+++ b/lib/observer/src/observer_tv_table.erl
@@ -260,14 +260,7 @@ handle_event(#wx{event=#wxList{type=command_list_col_click, col=Col}},
{noreply, State};
handle_event(#wx{event=#wxSize{size={W,_}}}, State=#state{grid=Grid}) ->
- wx:batch(fun() ->
- Cols = wxListCtrl:getColumnCount(Grid),
- Last = lists:foldl(fun(I, Last) ->
- Last - wxListCtrl:getColumnWidth(Grid, I)
- end, W-?LCTRL_WDECR, lists:seq(0, Cols - 2)),
- Size = max(?DEFAULT_COL_WIDTH, Last),
- wxListCtrl:setColumnWidth(Grid, Cols-1, Size)
- end),
+ observer_lib:set_listctrl_col_size(Grid, W),
{noreply, State};
handle_event(#wx{event=#wxList{type=command_list_item_selected, itemIndex=Index}},