需要Tab控制帮助 [英] Tab Control Help Wanted

查看:74
本文介绍了需要Tab控制帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我有一个带有5页Tab控件的表单。


当我打开表单时,我希望它在我之前打开表格的页面上我看到




提前注意并提前致谢


笑脸鲍勃

Hi Everybody

I have a form with a 5 page Tab contol.

When I open the form, I would like it to be on the page I last looked
at when I previously open the form.

Regard and Thanks in advance

Smiley Bob

推荐答案

Bob Dydd写道:
Bob Dydd wrote:
我有一个带有5页Tab控件的表单。

当我打开表单时,我希望它在我上次打开表单时的页面上。
I have a form with a 5 page Tab contol.

When I open the form, I would like it to be on the page I last looked
at when I previously open the form.




可能有很多方法可以做到这一点,但这就是我要做的:


表单有一个Tag属性,其唯一的功能是存储任何额外的

您想要的表格信息。在

表格的OnClose事件中,存储焦点在此属性中的Page的名称,

并在OnOpen事件上检索它并将焦点设置为那个页面。



There are probably a ton of ways to do this, but this is what I would do:

Forms have a Tag property whose only functionality is to store any extra
information you want about the form. On the OnClose event of the
form, store the name of the Page that has the focus in this property,
and on the OnOpen event retrieve it and set the focus to that page.


看看这篇文章:

下次打开表单时返回相同的记录
at:
http: //members.iinet.net.au/~allenbrowne/ser-18.html


它解释了下次表单打开时如何返回相同的记录。你可以使用相同的方法将选项卡控件的值存储在

表中,然后在表单的Load事件中再次设置该值。 />

-

Allen Browne - 微软MVP。西澳大利亚州珀斯。

访问用户提示 - http:// allenbrowne.com/tips.html

回复群组,而不是mvps dot org的allenbrowne。


" John Baker" < BA ***** @ ix.netcom.com>在消息中写道

news:Mk **************** @ fe1.columbus.rr.com ...
Take a look at this article:
Return to the same record next time form is opened
at:
http://members.iinet.net.au/~allenbrowne/ser-18.html

It explains how to return to the same record next time the form opens. You
could use the same approach to store the Value of the tab control in a
table, and then set the value again in the Load event of the form.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John Baker" <ba*****@ix.netcom.com> wrote in message
news:Mk****************@fe1.columbus.rr.com...
Bob Dydd写道:
Bob Dydd wrote:
我有一个带有5页Tab控件的表单。

当我打开表单时,我希望它出现在我上次查看的页面上当我以前打开表格时。
I have a form with a 5 page Tab contol.

When I open the form, I would like it to be on the page I last looked
at when I previously open the form.



可能有很多方法可以做到这一点,但这就是我要做的:

表格有一个Tag属性,其唯一功能是存储您想要的有关表单的任何额外信息。在窗体的OnClose事件中,
将焦点的Page名称存储在此属性中,并在
OnOpen事件中检索它并将焦点设置为该页面。



There are probably a ton of ways to do this, but this is what I would do:

Forms have a Tag property whose only functionality is to store any extra
information you want about the form. On the OnClose event of the form,
store the name of the Page that has the focus in this property, and on the
OnOpen event retrieve it and set the focus to that page.



" Bob Dydd" <再************** @ yahoo.co.uk>在消息中写道

news:25 ************************** @ posting.google.c om
"Bob Dydd" <re**************@yahoo.co.uk> wrote in message
news:25**************************@posting.google.c om
大家好我

我有一个带有5页Tab控件的表单。

当我打开表单时,我希望它在页面上我最后看了
我之前打开表格。

提前注意并提前致谢

笑脸鲍勃
Hi Everybody

I have a form with a 5 page Tab contol.

When I open the form, I would like it to be on the page I last looked
at when I previously open the form.

Regard and Thanks in advance

Smiley Bob




那么你将不得不在某处存储这些信息。你可以用一个表来存储这样的配置信息,从中读取

格式的'Open或Load事件,并以's'的形式更新它卸载或

关闭事件 - 或者您可以创建和使用

表单的私有属性。最后需要更多的代码 - 让我知道你是否想要这样的



当前显示的选项卡控件的页面可用

(读/写)作为选项卡控件本身的值。此值为

等于显示页面的PageIndex属性。


-

Dirk Goldgar,MS Access MVP
www.datagnostics.com


(请回复新闻组)



Then you''re going to have to store that information somewhere. You
could have a table to store such configuration information, read from it
in the form''s Open or Load event, and update it in the form''s Unload or
Close event -- or you could create and use a private property of the
form. That last requires a bit more code -- let me know if you want to
go that way.

The page of the tab control that is currently displayed is available
(read/write) as the Value of the tab control itself. This value is
equal to the PageIndex property of the displayed page.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


这篇关于需要Tab控制帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆