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 Gmail Ercolano Aug 11, 2021  
 

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

No, you got it backwards.  I have an Fl::scheme( "plastic" ) and I want one of the buttons to be flat.
How do I go about it?

    Hmm, if I set the Fl::scheme("plastic") and create two buttons, and set one of them
    to box(FL_FLAT_BOX), I get a flat button, so it's kinda unclear what you want instead:



#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
int main()
{
    Fl::scheme("plastic");
    Fl_Double_Window *win = new Fl_Double_Window(800,800,"Test");
    Fl_Button *b1 = new Fl_Button(10,10,200,30,"Normal Button");
    Fl_Button *b2 = new Fl_Button(10,50,200,30,"Flat Button");
    b2->box(FL_FLAT_BOX);
    win->end();
    win->show();
    return Fl::run();
}

--
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/dbcacb59-fa8a-71eb-9ddf-4803a59c32d7%40gmail.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'.