Tab order between two datawindows

Hello,

  I have two datawindow in a window, first datawindow have 5 fields,
after third field when user enter a tab, cursor should move to the
second datawindow , after that cursor should go back to first window
when user enters a tab.
please suggest me what would be the best approach for this.

Thanks,
kumar.
0
Kumar
2/22/2008 7:58:44 PM
📁 sybase.powerbuilder.general
📃 62418 articles.
⭐ 19 followers.

💬 7 Replies
👁️‍🗨️ 1089 Views

You will have to code your own tab logic. I'm not sure what the best 
approach would be. Maybe you can use the ItemFocusChanged datawindow 
event with the KeyDown function.

e.g.

IF dwo.Name = "4thColumn" AND KeyDown(KeyTab!) THEN
	dw_2.SetFocus()
END IF

I'm not sure if that will work. Give it a shot.

Brad

Kumar wrote:
> Hello,
> 
>   I have two datawindow in a window, first datawindow have 5 fields,
> after third field when user enter a tab, cursor should move to the
> second datawindow , after that cursor should go back to first window
> when user enters a tab.
> please suggest me what would be the best approach for this.
> 
> Thanks,
> kumar.
0
Brad
2/24/2008 3:54:30 PM
Looks like the ItemFocusChanged event fires after the key has been released. 
Map a user event to pbm_dwnkey, then
IF key = KeyTab!
AND This.GetColumnName() = 'field3' THEN
    dw_2.SetFocus()
END IF

"Brad Wery [TeamSybase]"  wrote in message 
news:[email protected]...
> You will have to code your own tab logic. I'm not sure what the best 
> approach would be. Maybe you can use the ItemFocusChanged datawindow event 
> with the KeyDown function.
>
> e.g.
>
> IF dwo.Name = "4thColumn" AND KeyDown(KeyTab!) THEN
> dw_2.SetFocus()
> END IF
>
> I'm not sure if that will work. Give it a shot.
>
> Brad
>
> Kumar wrote:
>> Hello,
>>
>>   I have two datawindow in a window, first datawindow have 5 fields,
>> after third field when user enter a tab, cursor should move to the
>> second datawindow , after that cursor should go back to first window
>> when user enters a tab.
>> please suggest me what would be the best approach for this.
>>
>> Thanks,
>> kumar. 


0
Jerry
2/24/2008 5:26:39 PM
And since we're building a solution , IME I've had better luck
*POSTing* a control-focus manipulation than trying to execute it
immediately while PowerBuilder was in the middle of a
control-focus-change operation. 

Good luck,

Terry [TeamSybase] and Sequel the techno-kitten

On 24 Feb 2008 09:26:39 -0800, "Jerry Siegel [TeamSybase]"
 wrote:

>Looks like the ItemFocusChanged event fires after the key has been released. 
>Map a user event to pbm_dwnkey, then
>IF key = KeyTab!
>AND This.GetColumnName() = 'field3' THEN
>    dw_2.SetFocus()
>END IF
>
>"Brad Wery [TeamSybase]"  wrote in message 
>news:[email protected]...
>> You will have to code your own tab logic. I'm not sure what the best 
>> approach would be. Maybe you can use the ItemFocusChanged datawindow event 
>> with the KeyDown function.
>>
>> e.g.
>>
>> IF dwo.Name = "4thColumn" AND KeyDown(KeyTab!) THEN
>> dw_2.SetFocus()
>> END IF
>>
>> I'm not sure if that will work. Give it a shot.
>>
>> Brad
>>
>> Kumar wrote:
>>> Hello,
>>>
>>>   I have two datawindow in a window, first datawindow have 5 fields,
>>> after third field when user enter a tab, cursor should move to the
>>> second datawindow , after that cursor should go back to first window
>>> when user enters a tab.
>>> please suggest me what would be the best approach for this.

*********************************
Build your vocabulary while feeding the hungry
http://www.freerice.com
*********************************
Newsgroup User Manual
=====================
TeamSybase <> Sybase employee
Forums = Peer-to-peer
Forums <> Communication with Sybase
IsNull (AnswerTo (Posting)) can return TRUE
Forums.Moderated = TRUE, so behave or be deleted
*********************************

Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a free PowerBuilder Developer's Toolkit. 
Version 4.0.3 now available at the Sandbox
PB Futures updated Feb 22/2008
See the PB Troubleshooting & Migration Guides at the Sandbox
^ ^
o o
=*=
0
Terry
2/24/2008 8:10:27 PM
Yup. And he may want to save the row and column to be able to post SetRow 
and SetColumn when tabbing back to the first DW. I'd have designed it to all 
be in the same DW, but I'm lazy that way .

"Terry Voth"  wrote in message 
news:0kj3s3hn055vonhnsn96v[email protected]...
> And since we're building a solution , IME I've had better luck
> *POSTing* a control-focus manipulation than trying to execute it
> immediately while PowerBuilder was in the middle of a
> control-focus-change operation.
>
> Good luck,
>
> Terry [TeamSybase] and Sequel the techno-kitten
>
> On 24 Feb 2008 09:26:39 -0800, "Jerry Siegel [TeamSybase]"
>  wrote:
>
>>Looks like the ItemFocusChanged event fires after the key has been 
>>released.
>>Map a user event to pbm_dwnkey, then
>>IF key = KeyTab!
>>AND This.GetColumnName() = 'field3' THEN
>>    dw_2.SetFocus()
>>END IF
>>
>>"Brad Wery [TeamSybase]"  wrote in message
>>news:[email protected]...
>>> You will have to code your own tab logic. I'm not sure what the best
>>> approach would be. Maybe you can use the ItemFocusChanged datawindow 
>>> event
>>> with the KeyDown function.
>>>
>>> e.g.
>>>
>>> IF dwo.Name = "4thColumn" AND KeyDown(KeyTab!) THEN
>>> dw_2.SetFocus()
>>> END IF
>>>
>>> I'm not sure if that will work. Give it a shot.
>>>
>>> Brad
>>>
>>> Kumar wrote:
>>>> Hello,
>>>>
>>>>   I have two datawindow in a window, first datawindow have 5 fields,
>>>> after third field when user enter a tab, cursor should move to the
>>>> second datawindow , after that cursor should go back to first window
>>>> when user enters a tab.
>>>> please suggest me what would be the best approach for this.
>
> *********************************
> Build your vocabulary while feeding the hungry
> http://www.freerice.com
> *********************************
> Newsgroup User Manual
> =====================
> TeamSybase <> Sybase employee
> Forums = Peer-to-peer
> Forums <> Communication with Sybase
> IsNull (AnswerTo (Posting)) can return TRUE
> Forums.Moderated = TRUE, so behave or be deleted
> *********************************
>
> Sequel's Sandbox: http://www.techno-kitten.com
> Home of PBL Peeper, a free PowerBuilder Developer's Toolkit.
> Version 4.0.3 now available at the Sandbox
> PB Futures updated Feb 22/2008
> See the PB Troubleshooting & Migration Guides at the Sandbox
> ^ ^
> o o
> =*= 


0
Jerry
2/24/2008 10:17:31 PM
Here's an idea I've used before.
Add a couple of **** column objects to each datawindow as
placeholders in the tab order, make them small, transparent, with no
focus rectangle so you can't see them. Then in the itemfocuschanged
event you know which object received focus so you can set focus to the
other datawindow.

For example;
dw_1 would have the following objects (listed in tab order)
column_1
column_2
column_3
****_object_1
****_object_2
column_4
column_5

dw_2 would have
****_object_1
column_1
column_2
column_3
****_object_2

When the **** objects receive focus set focus to the following;
dw_1.****_object_1 => dw_2.column_1
dw_1.****_object_2 => dw_2.column_3
dw_2.****_object_1 => dw_1.column_3
dw_2.****_object_2 => dw_1.column_4


On Feb 25, 8:17 am, "Jerry Siegel [TeamSybase]"
 wrote:
> Yup. And he may want to save the row and column to be able to post SetRow
> and SetColumn when tabbing back to the first DW. I'd have designed it to all
> be in the same DW, but I'm lazy that way .
>
> "Terry Voth"  wrote in message
>
> news:0kj3s3hn055vonhnsn96v0en7n[email protected]...
>
> > And since we're building a solution , IME I've had better luck
> > *POSTing* a control-focus manipulation than trying to execute it
> > immediately while PowerBuilder was in the middle of a
> > control-focus-change operation.
>
> > Good luck,
>
> > Terry [TeamSybase] and Sequel the techno-kitten
>
> > On 24 Feb 2008 09:26:39 -0800, "Jerry Siegel [TeamSybase]"
> >  wrote:
>
> >>Looks like the ItemFocusChanged event fires after the key has been
> >>released.
> >>Map a user event to pbm_dwnkey, then
> >>IF key = KeyTab!
> >>AND This.GetColumnName() = 'field3' THEN
> >>    dw_2.SetFocus()
> >>END IF
>
> >>"Brad Wery [TeamSybase]"  wrote in message
> >>news:[email protected]...
> >>> You will have to code your own tab logic. I'm not sure what the best
> >>> approach would be. Maybe you can use the ItemFocusChanged datawindow
> >>> event
> >>> with the KeyDown function.
>
> >>> e.g.
>
> >>> IF dwo.Name = "4thColumn" AND KeyDown(KeyTab!) THEN
> >>> dw_2.SetFocus()
> >>> END IF
>
> >>> I'm not sure if that will work. Give it a shot.
>
> >>> Brad
>
> >>> Kumar wrote:
> >>>> Hello,
>
> >>>>   I have two datawindow in a window, first datawindow have 5 fields,
> >>>> after third field when user enter a tab, cursor should move to the
> >>>> second datawindow , after that cursor should go back to first window
> >>>> when user enters a tab.
> >>>> please suggest me what would be the best approach for this.
>
> > *********************************
> > Build your vocabulary while feeding the hungry
> >http://www.freerice.com
> > *********************************
> > Newsgroup User Manual
> > =====================
> > TeamSybase <> Sybase employee
> > Forums = Peer-to-peer
> > Forums <> Communication with Sybase
> > IsNull (AnswerTo (Posting)) can return TRUE
> > Forums.Moderated = TRUE, so behave or be deleted
> > *********************************
>
> > Sequel's Sandbox:http://www.techno-kitten.com
> > Home of PBL Peeper, a free PowerBuilder Developer's Toolkit.
> > Version 4.0.3 now available at the Sandbox
> > PB Futures updated Feb 22/2008
> > See the PB Troubleshooting & Migration Guides at the Sandbox
> > ^ ^
> > o o
> > =*=

0
Jeremy
2/24/2008 11:32:20 PM
Hello ,
  Thanks a lot for response.I tried to impliment the logic which you
have mentioned.
When i get the focus to third field , am setting the focus to dw2 but
i am wondering how we can get back to the next column of dw_1 after
the last field of dw_2.
I used the dw_1.setfocus then tried to use setcolumn.but i cudn't see
that dw_1 is gaining the focus.
Also in dw_1, we need jumbling tab order so i changed the tab order in
that data window, but the tab order i mentioned is not working.any
suggestions??


Thanks,
Kumar.

On Feb 24, 11:26=A0am, "Jerry Siegel [TeamSybase]"
 wrote:
> Looks like the ItemFocusChanged event fires after the key has been release=
d.
> Map a user event to pbm_dwnkey, then
> IF key =3D KeyTab!
> AND This.GetColumnName() =3D 'field3' THEN
> =A0 =A0 dw_2.SetFocus()
> END IF
>
> "Brad Wery [TeamSybase]"  wrote in messagenews:47c193=
[email protected]...
>
>
>
> > You will have to code your own tab logic. I'm not sure what the best
> > approach would be. Maybe you can use the ItemFocusChanged datawindow eve=
nt
> > with the KeyDown function.
>
> > e.g.
>
> > IF dwo.Name =3D "4thColumn" AND KeyDown(KeyTab!) THEN
> > dw_2.SetFocus()
> > END IF
>
> > I'm not sure if that will work. Give it a shot.
>
> > Brad
>
> > Kumar wrote:
> >> Hello,
>
> >> =A0 I have two datawindow in a window, first datawindow have 5 fields,
> >> after third field when user enter a tab, cursor should move to the
> >> second datawindow , after that cursor should go back to first window
> >> when user enters a tab.
> >> please suggest me what would be the best approach for this.
>
> >> Thanks,
> >> kumar.- Hide quoted text -
>
> - Show quoted text -

0
Kumar
2/26/2008 9:03:56 PM
See Terry's and Jeremy's suggestions.

"Kumar"  wrote in message 
news:363e3ff1-23b4-4739-9626-1477f20de1e3@p25g2000hsf.googlegroups.com...
Hello ,
  Thanks a lot for response.I tried to impliment the logic which you
have mentioned.
When i get the focus to third field , am setting the focus to dw2 but
i am wondering how we can get back to the next column of dw_1 after
the last field of dw_2.
I used the dw_1.setfocus then tried to use setcolumn.but i cudn't see
that dw_1 is gaining the focus.
Also in dw_1, we need jumbling tab order so i changed the tab order in
that data window, but the tab order i mentioned is not working.any
suggestions??


Thanks,
Kumar.

On Feb 24, 11:26 am, "Jerry Siegel [TeamSybase]"
 wrote:
> Looks like the ItemFocusChanged event fires after the key has been 
> released.
> Map a user event to pbm_dwnkey, then
> IF key = KeyTab!
> AND This.GetColumnName() = 'field3' THEN
> dw_2.SetFocus()
> END IF
>
> "Brad Wery [TeamSybase]"  wrote in 
> messagenews:[email protected]...
>
>
>
> > You will have to code your own tab logic. I'm not sure what the best
> > approach would be. Maybe you can use the ItemFocusChanged datawindow 
> > event
> > with the KeyDown function.
>
> > e.g.
>
> > IF dwo.Name = "4thColumn" AND KeyDown(KeyTab!) THEN
> > dw_2.SetFocus()
> > END IF
>
> > I'm not sure if that will work. Give it a shot.
>
> > Brad
>
> > Kumar wrote:
> >> Hello,
>
> >> I have two datawindow in a window, first datawindow have 5 fields,
> >> after third field when user enter a tab, cursor should move to the
> >> second datawindow , after that cursor should go back to first window
> >> when user enters a tab.
> >> please suggest me what would be the best approach for this.
>
> >> Thanks,
> >> kumar.- Hide quoted text -
>
> - Show quoted text -


0
Jerry
2/26/2008 9:24:37 PM