w. szukalski wrote:
> I can not change the textsize of the Input widget of the ComboBox.
>
> combo->textsize(18);
>
> changes the textsize of the items only. The Input textsize remains
> to be 12.
verified in my test.
> Is there no method to change the textsize of the Input widget?
Don't know, and it looks like ComboBox isn't documented at all :-(
> In desparation I made the following changes in fltk-2.0.x-r6921.
>
> winfried
>
> --- fltk/ComboBox.h.orig 2009-11-30 15:12:26.000000000 +0100
> +++ fltk/ComboBox.h 2009-11-30 15:12:46.000000000 +0100
> @@ -58,6 +58,7 @@
>
> int size(bool ofText) const
> { return ofText ? input_->size() : Choice::size(); }
> + void input_textsize(int v){ input_->textsize(v); }
This is useless, probably because you added this before the second
part of the patch. It is overridden by the added statements in
src/ComboBox.cxx (see below):
> int position() const { return input_->position();}
> int mark() const { return input_->mark();}
The following patch is in ComboBox::draw():
> --- src/ComboBox.cxx.orig 2009-11-30 15:00:31.000000000 +0100
> +++ src/ComboBox.cxx 2009-11-30 16:27:09.000000000 +0100
> @@ -80,6 +80,8 @@
> fltk::push_matrix();
> fltk::translate(input_->x(), input_->y());
> input_->color(color());
> + input_->textsize(textsize());
This ^ overwrites any value set by input_textsize().
> + input_->textcolor(textcolor());
Okay, that was missing as well.
> input_->draw();
> fltk::pop_matrix();
> input_->set_damage(0);
Summary: The patch of src/ComboBox.cxx looks okay for me, the patch of
fltk/ComboBox.h should be omitted.
Would you please add this as an STR for FLTK2 (with RFE status)?
http://www.fltk.org/str.php
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk