Hi all,

We have a scrollbox application.
there are a set of menuitem widgets inside the scrollbox.

If the size of the scrollbox is not enough to cover all the menuitems, we will 
scroll through the menuitems using down/up keys. Let's say we have 20 menuitems 
and only 6 of them fits in the box. It is ok to scroll down with keys until item 6.
However, after the 6th one, when we want to scroll down to 7th, cursor points to the 
bottom of the box, not to 7th menuitem. If i press up key and then down key, now
i'm on the 7th item. Cursor points to the 7th item, and everything seems normal. One 
more scroll-down and the same thing happens again.

Is there a way to avoid this, i mean by setting menuitem properties etc?
(I'm attaching part of my code below.)

...
Box2 = pgNewWidget(PG_WIDGET_SCROLLBOX, PG_DERIVE_INSIDE, Box1);
pgSetWidget(PGDEFAULT,
            PG_WP_SIDE,PG_S_BOTTOM,
            PG_WP_SIZE,110,
            0);

for(i=0; i<20; i++)
{
  if(i == 0)
    MyLabels[i] = pgNewWidget(PG_WIDGET_MENUITEM, PG_DERIVE_INSIDE, Box2);
  else
    MyLabels[i] = pgNewWidget(PG_WIDGET_MENUITEM, PG_DERIVE_AFTER, 0);

  sprintf(mystring,"Test %d", i);
  pgSetWidget(PGDEFAULT,
              PG_WP_SIDE, PG_S_TOP,
              PG_WP_TEXT, pgNewString(mystring),
              PG_WP_FONT, pgNewFont("Times New Roman", 8, PG_FSTYLE_DEFAULT),
              PG_WP_EXTDEVENTS, PG_EXEV_FOCUS,
              0);

}

Thanks


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to