FLTK logo

STR #2210

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 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]

STR #2210

Application:FLTK Library
Status:5 - New
Priority:3 - Moderate, e.g. unable to compile the software
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:value() returns incorrect value during button press
Version:2.0-current
Created By:parshin
Assigned To:Unassigned
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]

No files


Trouble Report Comments:

Post Text ]
Name/Time/Date Text  
 
#1 parshin
19:55 Jun 27, 2009
During draw() or callback, the pressed Button returns 0. The following code is a modified callback function from tests/Button.cxx. Upon pressing the button "Beep", it should change label to "1", and change it back to "0" upon release. In my tests, it just goes to "0". This is probably because pressing the button changes PUSHED flag, but value() returns STATE flag. This is also different from FLTK 1.x (value() works correctly there) and from FLTK 2.x documentation.

void beepcb(Widget *w, void *) {
  printf("\007"); fflush(stdout);
  Button* b = (Button*) w;
  if (b->value())
    b->label("1");
  else
    b->label("0");
}
 
     

Return to Bugs & Features | Post Text | Post File ]

 
 

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'.