以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 显示当前表 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=104957) |
-- 作者:lk15502 -- 发布时间:2017/8/9 9:36:00 -- 显示当前表 选择页面集合中不同的页签,怎么自动在状态栏显示分区面板绑定的表名?现在切换会显示窗口的所有者表MAIN,?? |
-- 作者:有点甜 -- 发布时间:2017/8/9 10:44:00 -- 你切换不同的页签后,让table控件获取焦点。
SelectedIndexChanged事件
Dim p As WinForm.TabPage = e.sender.SelectedPage |
-- 作者:lk15502 -- 发布时间:2017/8/9 11:06:00 -- 老师,上面的代码写入控件TabControl的SelectedIndexChanged事件 ;还是和原来一样,没有作用;而且上面代码第一次接触,不能全部理解? |
-- 作者:lk15502 -- 发布时间:2017/8/9 11:12:00 -- 窗口的所有者表是表MAIN,页面集合的每个页签有一个分区面板,分区面板有一个表控件,希望这个表控件获取焦点。 |
-- 作者:有点甜 -- 发布时间:2017/8/9 11:17:00 -- 你状态栏的代码怎么写?写在什么事件?
或者做个实例发上来测试。 |
-- 作者:lk15502 -- 发布时间:2017/8/9 11:28:00 -- 写在项目属性的Systemidle事件中: With CurrentTable Dim Str2 As String = "用户: " & _UserName Str2 = Str2 & " 表名: " & .Name & " 总行数: " Str2 = Str2 & .Rows.Count & " 当前行: " & (.Position + 1) StatusBar.Message2 = Str2 End With \'-----------在状态栏的中间显示用户名,表名,总行数和当前行-------------- Dim str1 As String = "" Dim t As Table = CurrentTable Str1 = Str1 & "计数:" & t.Aggregate(AggregateEnum.Count, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " " Str1 = Str1 & "累计:" & t.Aggregate(AggregateEnum.Sum, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " " Str1 = Str1 & "平均:" & t.Aggregate(AggregateEnum.Average, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " " Str1 = Str1 & "最大:" & t.Aggregate(AggregateEnum.Max, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " " Str1 = Str1 & "最小:" & t.Aggregate(AggregateEnum.Min, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " " \'Str1 = Str1 & "标准差:" & t.Aggregate(AggregateEnum.Std, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " " \'Str1 = Str1 & "总体标准差:" & t.Aggregate(AggregateEnum.StdPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " " \'Str1 = Str1 & "方差:" & t.Aggregate(AggregateEnum.Var, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " " \'Str1 = Str1 & "总体方差:" & t.Aggregate(AggregateEnum.VarPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " " StatusBar.Message3 = str1 |
-- 作者:有点甜 -- 发布时间:2017/8/9 11:34:00 -- 我测试没问题,你点击切换tabcontrol的页面了吗? |
-- 作者:lk15502 -- 发布时间:2017/8/9 12:00:00 -- 点击了,没有反应 |
-- 作者:有点甜 -- 发布时间:2017/8/9 15:33:00 -- 以下是引用lk15502在2017/8/9 12:00:00的发言:
点击了,没有反应
不可能,举例做个例子发上来测试。 |