Lisa Rapchick wrote:
> I have a 12-key "keypad"
> 1 2 3
> 4 5 6
> 7 8 9
> * 0 #
> where each digit is a derived class of Fl::Button and has a BMP image.  The 
> buttons are part of an Fl::Window.

        This test app is probably similar in some ways:
        http://seriss.com/people/erco/fltk/#TouchScreenNumPad

> When the keypad displays, it does so by calling 'show' for each of
> the 12 buttons in a loop.  When the buttons are not supposed to be
> active, 'hide' is called.

        Probably putting these all in a group and hide()/show()ing the group
        would be easier.

        Just be sure the buttons are 'inside' the group, both parenting-wise
        and xywh-wise.

> However, the FL_PUSH/RELEASE events are (no longer) being seen by digits 
> 2,3,8 and 9.

        Is this after a hide()/show() operation, or is it just that always
        the buttons are not receiving events?

        If the latter, check the parent widget's xywh extents compared to the
        positions of the buttons, to make sure the buttons aren't positioned
        outside a parent's xywh extents.

        IIRC, Fl_Group by default does not clip children that are outside of
        its xywh extents, such that the children may draw correctly, but events
        /will/ be clipped, possibly causing the problem you're describing.

        One way to easily debug is to change the color of the parent group(s)
        and set their boxtype to a flat box type, so that you can see their
        borders, and thus see if the buttons are drawing beyond those areas.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to