That works, thanks!But when I apply to a login dialog contains a ListButton for user Ids, TextInput for password and few PushButtonswhich I extended from org.apache.pivot.wtk.Sheet and I've tried both BXML<BoxPane .... focusTraversalPolicy="$bxml:null" ... />or wrap that component in a container then call setFocusTraversalPolicy(null), it doesn't works. I just want to make sure it should works for org.apache.pivot.wtk.Sheet alsoso that I can continue to try on the same approach. Regards,Jeffrey Date: Thu, 13 Feb 2014 16:22:02 -0800 From: rogerandb...@rbwhitcomb.com To: user@pivot.apache.org Subject: Re: Disable Component Focusable Properties
To disable tabbing for a particular container, in BXML you can do (for instance): <BoxPane .... focusTraversalPolicy="$bxml:null" ... /> And of course you could call the "setFocusTraversalPolicy(null)" from Java as well (on the container). To disable focus for a particular component only, you could wrap just that component in a BoxPane (or other container) and set the "focusTraversalPolicy" as above to null. ~Roger On 2/13/14 6:24 AM, Jeffrey Law wrote: Dear Sandro, Thanks for your reply! My issue is very simple to demo. I actually started my project with the sample [Pivot Stock Traker]. http://pivot.apache.org/tutorials/stock-tracker.html Exactly my issue is when you start up the demo, the focus is in the [Symbol] textbox. But if you press [TAB] key the focus will certainly loss. But if you can set the table's focusable property to false, the table will not receive the focus and the focus will always stays in the [Symbol] textbox. As you mentioned also I can't just disable the table component cause I need to handle addition and deletion of the active rows as well. Maybe I can forcing requestFocus on all other components but then I need to create also several customized dialog in order to capture user's input selection also. So I really hope can hear the good news on 2.1! Regards, Jeffrey > Date: Wed, 12 Feb 2014 12:24:08 +0100 > Subject: Re: Disable Component Focusable Properties > From: sandro.mart...@gmail.com > To: user@pivot.apache.org > > Hi Jeffrey, welcome to Pivot. > First sorry for the big delay ... many time ago I wrote a simple test > class, Pivot686 (under our tests subproject) to test the related issue > (closed many time ago), and there I was forcing requestFocus on a > TextInput component, at Application startup ... maybe a trick like > this could help even in your case, when your component is losing > focus. > > On the disable focus on all other components don't know it could be a > good solution (you can disable components but that would cause other > effects too). If you really need something like this we can try to > look for 2.1, but if you could post a minimal sample would be great. > > Bye, > Sandro > > > 2014-01-28 16:49 GMT+01:00 Jeffrey Law <jeffreylaw...@hotmail.com>: > > Hi there, > > I'm new to apache pivot. I was quite impressed with the speed and UI of the > > framework > > and that's the reason why I decided to migrate my POS application from > > Swing. > > But then half way thru I realized none of the following method can be found > > for all the components: > > setFocusable(false) > > setFocusTraversalKeysEnabled(false) > > setRequestFocusEnabled(false) > > > > As the application required the focus always stayed in the single text field > > for the scanner input, > > so I got to disable the focus requests for all other components. > > I did tried on previewFocusedChange but still didn't managed to get it > > works. > > Can I have some hints or example on how to create a custom focus traversal > > policy to the component which can allow me to disable the traversal > > properties also? > > Does anyone can share if there's any way to do this? Thanks in advance!! > >