The fltk2 ScrollGroup does not allow transparency: is this correct?

The following short program shows that the upper widget is transparent:
------------------------------
// fltk-2.0.x-r6960/test/hello.cxx
#include <fltk/Window.h>
#include <fltk/Widget.h>
#include <fltk/run.h>
#include <fltk/draw.h>
#include <fltk/Color.h>

using namespace fltk;

class Upper: public Widget
{
public:
        Upper(int X, int Y, int W, int H):
     Widget(X,Y,W,H){ box(NO_BOX); }

    void draw()
   {
    setfont(HELVETICA_BOLD, 32);
    setcolor(RED);
    drawtext("Upper Text :-)", Rectangle(w(),h()), ALIGN_CENTER);
   }
};

int main()
{
  Window *window = new Window(300, 180);
  window->begin();

  Widget *wid = new Widget(20, 40, 260, 100, "Hello, World!");
  wid->box(UP_BOX);
  wid->labelfont(HELVETICA_BOLD_ITALIC);
  wid->labelsize(36);
  wid->labeltype(SHADOW_LABEL);
  wid->color(YELLOW);

  Widget *upper = new Upper(20, 40, 260, 100);

  window->end();
  window->show();
  return run();
}
------------------------------
Now I try the same with a ScrollGroup.

I create a ScrollGroup and write a text into its canvas child.

TEST 1:
=======
I add a ScrollGroup to this ScrollGroup. I give the child ScrollGroup
a box(NO_BOX) and give its canvas child a box(NO_BOX). I expect
the text of the first ScrollGroup to be visible within the child
ScrollGroup. The text is invisible. The child ScrollGroup is opaque.

TEST 2:
=======
I replace the child ScrollGroup with a Group ( group->box(NO_BOX)
and canvas->box(NO_BOX) ). The text is visible. The child Group is
transparent.

Is there no way to make a ScrollGroup transparent?

winfried

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

Reply via email to