FLTK logo

Re: [fltk.general] Subclassing a plastic Fl_Button

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Subclassing a plastic Fl_Button Greg Ercolano Aug 11, 2021  
 

On 8/11/21 5:00 PM, Gonzalo Garramuño wrote:

I would like to subclass a plastic Fl_Button and change it to a flat drawing
before getting pressed.

    I'm assuming when you say 'plastic button' you mean one of the FL_PLASTIC_XXX_BOX
    values, and not Fl::scheme("plastic"), or you'd have described it as a plastic scheme
    with a button.

    So you want it to be an FL_FLAT_BOX before being pressed, then plastic
    while pressed? If so I'd think that'd be in the ctor:

      box(FL_FLAT_BOX);
      down_box(FL_PLASTIC_THIN_UP_BOX);

    Or if you want it to switch from being flat to a plastic button /after/
    being pressed (like a toggle), then I suppose in the ctor:

        box(FL_FLAT_BOX);

    ..and in the callback:

        down_box(FL_PLASTIC_THIN_UP_BOX);

    ..to cause it to switch.
    But I'm probably not understanding quite what you want..


--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/5ff93d87-3c17-27a9-02ca-c66794108388%40seriss.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.