[open-beos-printing] Re: Further PDF Writer Progress
- From: Michael Pfeiffer <michael.pfeiffer@xxxxxxxxx>
- To: open-beos-printing@xxxxxxxxxxxxx
- Date: Thu, 04 Apr 2002 08:11:59 +0200
4/3/02 5:31:12 PM, "Simon Gauvin" <gauvins@xxxxxxxxx> wrote:
>
>> 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.
Thanks.
What if DocInfoText does not handle tab, shift tab, ctrl tab, ... itself
but calls KeyDown of the parent class BView instead?
Michael
- Follow-Ups:
- [open-beos-printing] Re: Further PDF Writer Progress
- From: Michael Pfeiffer
- References:
- [open-beos-printing] Re: Further PDF Writer Progress
- From: Simon Gauvin
Other related posts:
- » [open-beos-printing] Further PDF Writer Progress
- » [open-beos-printing] Re: Further PDF Writer Progress
- » [open-beos-printing] Re: Further PDF Writer Progress
- » [open-beos-printing] Re: Further PDF Writer Progress
- » [open-beos-printing] Re: Further PDF Writer Progress
- » [open-beos-printing] Re: Further PDF Writer Progress
- » [open-beos-printing] Re: Further PDF Writer Progress
- » [open-beos-printing] Re: Further PDF Writer Progress
- » [open-beos-printing] Re: Further PDF Writer Progress
- » [open-beos-printing] Re: Further PDF Writer Progress
- » [open-beos-printing] Re: Further PDF Writer Progress
- [open-beos-printing] Re: Further PDF Writer Progress
- From: Michael Pfeiffer
- [open-beos-printing] Re: Further PDF Writer Progress
- From: Simon Gauvin