Feel free and write the missing FreeBASIC docu. ;-)Coolman wrote:documentation is insufficient ...
Hello coolman
Fl_WindowMakeCurrent() select the target for drawing.
Fl_GroupBegin() select the target for new widgets.
If you add new child widgets dynamical you should use Fl_WidgetRedraw(parent) also.
Joshy
Code: Select all
#include once "fltk-c.bi"
dim as integer count
dim as double t
dim as Fl_Window ptr win = Fl_WindowNew(350,120,"Test")
Fl_BoxNew(10,10,340,20,"Compteur")
Fl_WindowShow win
while Fl_WindowShown(win)
dim as double t = Fl_Wait2(0.1)
if count < 100 then
Fl_GroupBegin win
Fl_BoxNew(rnd*Fl_WidgetGetW(win),rnd*Fl_WidgetGetH(win),100,40,"test")
Fl_GroupEnd win
Fl_WidgetRedraw win
count+=1
end if
wend