Go to the FreeLists Home Page Home Signup Help Login
 



[open-beos-printing] || [Date Prev] [04-2002 Date Index] [Date Next] || [Thread Prev] [04-2002 Thread Index] [Thread Next]

[open-beos-printing] Re: Further PDF Writer Progress

  • From: "Simon Gauvin" <gauvins@xxxxxxxxx>
  • To: open-beos-printing@xxxxxxxxxxxxx
  • Date: Wed, 03 Apr 2002 15:31:12 EST (-0500)
> I have tried this already, but the problem is that the when the 
> BTextView 
> has the focus hitting the tabulator key does not change the focus 
> but instead inserts a tabulator into the text of the BTextView.
> 
> BTextView::DisallowChar('\t') is also not helpful.
 
Michael,

You need to override the KeyDown() method and check for the tab key and 
do the call to MakeFocus() manually, here is a code bit that will get 
you started:

void DocInfoText::KeyDown(const char *bytes, int32 numBytes)
{
    // test for tab
    if (bytes[0] =3D=3D '\t') {
        // get parent and get next child
        BView *child =3D NextSibling();
        if (child) {
            child->MakeFocus(true);
        } else {
            child =3D Parent()->ChildAt(0); 
            if (child) child->MakeFocus(true);
                   // *** Call the view here and send Tab Message or change 
scroll location. **//
        }
    } else {
        BTextView::KeyDown(bytes, numBytes);
    }
}
 
This is not totally safe since we should check the call to Parent(), 
and you would also need to do the 'Shift-Tab' check to go the other way 
too.

-----------------------------
Simon Gauvin
President, BeUnited
http://www.beunited.org








[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.