Jiang Yang wrote:

> Hi,
> thanks for your reply.
>> By using the ::add() method....
>>
>>
>> Fl_Box *b =3D new Fl_Box....
>>
>> my_window->add(b);
>     what do you mean the parameter 'my_window'??
>     I tried this in my callback function, but still not work.
>>
> 
> Thanks, i am new to FLTK.
> So look forward to receiving your assistances.
> 
> cheers,
> Yang
> 
> 
> 
>>
>> > >     Fl_Check_Button* flcb =3D3D ((Fl_Check_Button*)w);
>> > > if ( flcb->value() =3D3D=3D3D 1 ) {
>> > > flcb->labelcolor(FL_RED);
>> > > flcb->label("Label&Scale");
>> > >                 new Fl_Box(0, 20, 1000, 20, " first ");
>> > >                 new Fl_Box(0, 640, 1000, 20, "  second ");
>> > >                 new Fl_Box(0, 660, 1000, 20, " third ");
>> >=20
>> >=20
>> > How could I add these three new Box classes to the parent window???
>>
>>
>> By using the ::add() method....
>>
>>
>> Fl_Box *b =3D new Fl_Box....
>>
>> my_window->add(b);
>>
>>
>> This is covered in the docs, so a little reading might bring further
>> enlightment.

Call your parent window 'my_window'. Then wrap your 'new Fl_Box' statements
with my_window->begin() and my_window->end(). For example:

my_window->begin();
{
   new Fl_Box ...
   new Fl_Box ...
   new Fl_Box ...
}
my_window->end();


-- 
Alvin
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to