FLTK logo

Re: [fltk.general] Default value for Fl_Choice?

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: Default value for Fl_Choice? matthiasm Jul 12, 2007  
 
On Jul 13, 2007, at 7:52 AM, Suja wrote:

> I am using Fl_Choice->add to add values to Fl_Choice. How do I set
> a default, before the user selects one?
> Thanks in advance.

You set the current value using "value()"

http://www.fltk.org/documentation.php/doc-1.1/ 
Fl_Choice.html#Fl_Choice.value

after adding with - for example - "add()":

http://www.fltk.org/documentation.php/doc-1.1/Fl_Menu_.html#Fl_Menu_.add

You can use the index returned by "add()" directly with "value()".

----
http://robowerk.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'.