[haiku-development] Re: making my textview active

  • From: Niels Egberts <niels.egberts@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 14 Oct 2009 20:51:42 +0200

> You're obviously doing something wrong, as you don't need this to be
> able to type at all.
> Have you by any chance created a B_AVOID_FOCUS window?

I have not used B_AVOID_FOCUS. I have tried to use a lot of different
ones in my constructor. After my app launches I can type in my
textview (because I called MakeFocus in my constructor) but when
another part of the app gets focus. I can't get the focus back to my
textview by clicking on it. This is my constructor:

TodoText::TodoText(BRect rect) : BTextView(rect, "text",
BRect(0,0,100,100), B_FOLLOW_ALL_SIDES, B_FRAME_EVENTS | B_WILL_DRAW |
B_PULSE_NEEDED | B_NAVIGABLE)
{
        this->MakeSelectable();
        this->MakeEditable();
        MakeFocus();
}

Niels.

Other related posts: