STR #1161

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 1.1 ]

STR #1161

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Fl_Input does not set mark correctly when value(...) is called
Created By:JohnDoe
Assigned To:matt
Fix Version:1.1-current
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Name/Time/Date Filename/Size top right image
#1 JohnDoe
14:43 Jan 30, 2006
bottom left image   bottom right image

Trouble Report Comments:

Name/Time/Date Text top right image
#1 JohnDoe
14:43 Jan 30, 2006
According to the documentation, the mark and position should be set to the end when the value of an input is set using either value(const char*,int) or value(const char *).  However the Fl_Input_::value functions call static_value, which has this at the end:
position(0, readonly() ? 0 : size()); 

This makes all of the text in an Fl_Input highlighted when it is set by the program.  I'm not sure if this is a documentation bug or a code bug.  The fix would be to call position(size()) at the end of static_value instead. 

The main problem I've encountered with this is when calling fl_file_chooser with a directory as the argument.  You have to click the mouse at the end of the input box before typing a filename, or else you will overwrite the directory.
#2 matt
20:08 Apr 26, 2006
Fixed in Subversion repository.

I fixed the code to do what's in the docs. Seems to make sense to me, particularly in the directory chooser.
bottom left image   bottom right image

Return to Bugs & Features ]


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