News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Fl_Light_Button
Author Message
chrimo
Member
***


Posts: 94
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
Fl_Light_Button

Hi,

when using Fl_Light_Button the light didn't switch on ;-(
Do I have to set the value manually ?

Code:
fB = fltk:Fl_Light_Button(pos*BorderX+(pos-1)*ButtonSizeX, BorderY, ButtonSizeX, ButtonSizeY, "File Log");
fB:color(31);
fB:selection_color(31);
fB:tooltip("Write messages to file... ");
fB:redraw();

function file_callback(object)
    if(0==logwrite) then
        logwrite=1;
        fB:value(1);
    else
        logwrite=0;
        fB:value(0);
    end
    print("file_callback:"..logwrite.."Value:"..fB:value());
    fB:redraw();
    Fl:check();
end


The light never changes when pressing button...
I'm using OSX (PPC), bug or feature ?
Bye
Chrimo

08-20-2007 06:40 AM
Find all posts by this user Quote this message in a reply
chrimo
Member
***


Posts: 94
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #2
RE: Fl_Light_Button

ReHi,

I think it works,
BUT "ARE the colors too poor" ?!?

sB:selection_color(fltk.FL_GREEN) is needed !!!
My defaults are too bad!

Bye
Chrimo

This post was last modified: 08-20-2007 07:32 AM by chrimo.

08-20-2007 07:18 AM
Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #3
RE: Fl_Light_Button

Yeah, it doesn't work if fB:color() and fB:selection_color() are set to the same value =o)

Something I just bumped into the other day that is useful if you like to make your interface colors match those of other applications on your system:
Fl:get_system_colors()

I don't know how universal this is, but it at least works with X resources (and with KDE, as far as I've heard). I'll eventually test it on Windows.

08-20-2007 10:40 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: