Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 10 JUL 2008 03:21:21AM Martin Drenovac wrote:

I have a couple of tabs on a form.

I'm on tab 1, do something and decide that I need to go to a particular field, whcih happens to be on Tab 3. I do the usual set_property(FOCUS) and it get's me there, but the TAB order is not flowing with me. How / where / when do I detect that the FOCUS has now planted me on a different TAB so that I can call the tell the @WINDOW to "PAGE".

I'm using Send_Event(@Window, "PAGE",pageNo) but obviously not picking up the fact that I'm on a different page.

I'm using PE_events, so should I check for movement on every GOTFOCUS, in which case is there a quick way to check if the WINDOW has tabs prior to processing any further logic?

Cheers


At 10 JUL 2008 04:32AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Martin,

Use the form's VSCROLL event and check the VPOSITION to see which page you've been moved to and set the tab from there.

The Sprezzatura Group

World leaders in all things RevSoft


At 10 JUL 2008 04:50AM Barry Stevens wrote:

Try also send_event GOTFOCUS.

I am sure if, you have done all your paging scripts as per the help, it should auto switch. I think maybe the gotfocus is the trigger.

Not tested just thinking aloud.


At 10 JUL 2008 08:15AM Sean FitzSimons wrote:

Martin,

From the Help for Tabcontrols:

Manipulating the Tab Control

The Tab Control has four events: CLICK, GOTFOCUS, LOSTFOCUS and WINMSG. To manipulate the window via the Tab Control place the following code on the CLICK event:

declare subroutine Set_Property

Page=Get_Property(CtrlEntId, 'VALUE')

Set_Property(@WINDOW,'VPOSITION', Page)

This code will determine which tab was clicked and then go to the corresponding page.

On the VSCROLL event of the window place the following code:

declare subroutine Set_Property

Set_Property(tabControl,'VALUE', Value)

The VSCROLL event is passed the page number in the VALUE parameter of the event. Use this value to set the VALUE property of the Tab Control. This ensures that the proper tab is displayed for the correct page.

Sean


At 10 JUL 2008 09:11AM Martin Drenovac wrote:

Thanks all - i am on a field on the 1st tab, on the lostfocus of that field I set_prop(focus, 'someotherfield', 'whichisalso onantohretab')

it goes there but the tabs and display are in a mess -

what is the appropriate event which will be raised when the FOCUS is received by the new field?

I've yet to try the hint by Spretz - but I am not clicking the tabs, I am moving between tabs by focusing in on elements which are on a tab

thank you again


At 10 JUL 2008 10:01AM Sean FitzSimons wrote:

Martin,

Try:

Set_Property("SYSTEM","FOCUS","SOMEOTHERFIELD")

Instead of:

set_prop(focus, 'someotherfield', 'whichisalso onantohretab')

This will cause the Event Chain to kick in (LOSTFOCUS on the current control , GOTFOCUS on the SOMEOTHERFIELD control, etc.)

Sean

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/4061fe142690c1418525748200286855.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1