Prev: How big is the VO community
Next: SetCueBanner
From: Lu on 19 May 2010 11:17 Hello VO experts! I have a data-window with some sub-data-windows in it. With this statement: SELF:oSFSub1:SetStyle(WS_EX_CONTROLPARENT,TRUE) it is possible with the Tab-Key to set the focus on the controls of the sub window from the datawindow. If the focus is in the sub-window it does not go to the parent-window (it only change the focus of the controls inside the sub-window) Have you any hints that the focus gets out of the sub-window with the tab key? Thanks in advance Lu
From: Geoff Schaller on 19 May 2010 17:41 Lu. What do the sub data windows contain? Browsers? If so, switch over to bbrowser and this is trivial. You will be able to set this property in the WED. With databrowser though, and the form view, the issue is that the TAB key should properly bounce around the controls or columns on the sub data window. How are you going to indicate that the tab key behaviour has changed? ...and from which control? You could trap the TAB key in the Dispatch I guess and if you are on the "last" item, tab back out to the owner form by setting focus to that form but I don't like the concept. How do you end or enforce saves etc? Geoff "Lu" <lu2k(a)hotmail.com> wrote in message news:088bbc0e-1d33-4937-b2a9-900a6887ebfc(a)f14g2000vbn.googlegroups.com: > Hello VO experts! > > I have a data-window with some sub-data-windows in it. With this > statement: > SELF:oSFSub1:SetStyle(WS_EX_CONTROLPARENT,TRUE) it is possible with > the Tab-Key to set the focus on the controls of the sub window from > the datawindow. If the focus is in the sub-window it does not go to > the parent-window (it only change the focus of the controls inside the > sub-window) > > Have you any hints that the focus gets out of the sub-window with the > tab key? > > Thanks in advance > Lu
From: Stephen Quinn on 19 May 2010 17:50 Lu > Have you any hints that the focus gets out of the sub-window with the > tab key? Detect when the key is pressed on the last control on the page and force the issue. CYA Steve
From: Lu on 20 May 2010 07:51 Thanks for your answers. The sub data windows contain only different textboxes and comboboxes, and if the user chose on the parent window a certain item on a combobox then sub1 oder sub2 is shown. To save the values I access like self:osfsub1:odcsletest:value I will try it with the EditFocusChange Method or an Eventhandler Method to get the focus to the parent window back. Lu
From: Lu on 21 May 2010 15:31
Now I tried it with this EditFocusChange Method. It works fine if I use the tab key in one way but if I want go back with shift + tab from sle1 it focus the sle4 in the sub window. The reason is that if the sle1 has focus and I press the shift+tab key it goes to the last control in the sub (sle5), and EditFocusChange method is called again and now it focus sle4 because it should focus sle4 if the shift+tab key is pressed on sle5. I hope you know what I mean. Is it possible to prevent the behavoir that the focus change from the first sle to the last sle in the sub if I press shift+tab or another way to solve the problem. It is probably nicer to solve it with a dispatch method but I am not familiar making a own dispatch method. METHOD EditFocusChange(oEditFocusChangeEvent) CLASS Sub_Tz1 LOCAL oControl AS Control LOCAL lGotFocus AS LOGIC oControl := IIf(oEditFocusChangeEvent == NULL_OBJECT, NULL_OBJECT, oEditFocusChangeEvent:Control) lGotFocus := IIf(oEditFocusChangeEvent == NULL_OBJECT, FALSE,oEditFocusChangeEvent:GotFocus) SUPER:EditFocusChange(oEditFocusChangeEvent) IF lGotFocus == FALSE IF oControl:NameSym == #sle1 IF LOGIC(_CAST,_And( GetKeyState(VK_SHIFT),SHORT(_CAST, 0x8000))) //Shift key SELF:oParent:odccmbTz:SetFocus() ELSEIF SELF:oParent:_cStatus == 'A' .and. SELF:oParent:cmbTz != 'y' SELF:oParent:LoadFromTo() ENDIF ELSEIF oControl:NameSym == #sle5 IF LOGIC(_CAST,_And( GetKeyState(VK_SHIFT),SHORT(_CAST, 0x8000))) //Shift key SELF:oDCsle4:SetFocus() ELSE SELF:oParent:odccmbPers:SetFocus() ENDIF ENDIF ENDIF RETURN NIL Lu |