On 2002.01.03 13:16 Davina Armstrong wrote:
> If this is not the appropriate place to post questions about using
> PicoGUI, please let me know.

Nah, this is the perfect place to post picogui questions :)

> 
> I have two questions:
> 
> 1) I don't want the app name (the string passed to pgRegisterApp())
> displayed at the bottom of my screen.  I notice that using
> PG_APP_TOOLBAR makes it go away, but that doesn't really seem like the
> correct solution.  It doesn't show up in abstest, but I can't figure
> out
> why.  How can I make it go away.

There are three type of "root widgets" your application can have 
currently:

  - Normal application, with a 'panelbar' for resizing
  - Toolbar application, that will always stick to the edge of the 
screen
  - Popups, which are always modal and exist in their own layer above 
normal applications

When the app calls pgRegisterApp(PG_NORMAL_APP,"Foo",0) it creates a 
panel widget to house the application, which has the bar showing the 
app's name. If you want a truly fullscreen app, you could create a 
popup using pgNewPopup(), pgNewPopupAt(), or pgDialogBox(). However, 
creating a fullscreen popup is generally a rude thing to do as other 
applications don't get a chance to use the display at all. The best 
thing to do would be write a normal application, then disable the 
panelbar. You can do this in pgserver's compile-time options, or you 
can do it in the theme by setting the panelbar object's 'width' 
property to zero.

> 
> 2) On a similar note, I want to put my application name in a box at
> the
> top of the screen.

If you want the app title, just at the top of the screen, try setting 
your app to stick to the bottom of the screen rather than the default 
of sticking to the top. Right after your pgRegisterApp, call:

   pgSetWidget(PGDEFAULT, PG_WP_SIDE, PG_S_BOTTOM, 0);

> I then want the rest of the screen filled in with
> a
> scrolling list.  I create a list and then a scrollbar which I put
> inside
> the list.  Alone on the screen, I get a scrolling list as desired.
> But
> when I create a box with a label in it, put it inside the app, and
> tell
> it to stick to the side, the scrollbar disappears.

this is a known bug in the scrollbar. We'll fix it soon i hope :)

> 
> Any help would be very much appreciated.  Thanks!
> 
> Here's the code for question #2:
> 
> void createListScreen()
> {
>     pghandle list;
>     pghandle scrollbar;
>     pghandle item;
>     DIR* dir;
>     struct dirent* entry;
>     int numEntry = 0;
> 
>     pgEnterContext();
>     /* create the list of memos and scrollbar */
>     list = pgNewWidget(PG_WIDGET_LIST, 0, 0);
>     scrollbar = pgNewWidget(PG_WIDGET_SCROLL, PG_DERIVE_INSIDE, app);
>     pgSetWidget(list, PG_WP_SIDE, PG_S_TOP, 0);
>     pgSetWidget(scrollbar, PG_WP_BIND, list, 0);
> 
>     /* read the memopad dir and put memos in the scrolling list */
>     dir = opendir(MEMO_DIR);
>     entry = readdir(dir);
>     while (entry) {
>       if (strstr(entry->d_name, "memo")) {
>           item = pgCreateWidget(PG_WIDGET_BOX);
>           pgSetWidget(item, PG_WP_TRANSPARENT, TRUE, 0);
>           pgNewWidget(PG_WIDGET_LABEL, PG_DERIVE_INSIDE, item);
>           pgSetWidget(PGDEFAULT, PG_WP_TRANSPARENT, FALSE,
> PG_WP_TEXT,
>                       pgNewString(entry->d_name), PG_WP_ALIGN,
> PG_A_LEFT, 0);
>           pgListInsertAt(list, item, numEntry++);
>       }
>       entry = readdir(dir);
>     }
> 
>     pgFocus(list);
>     pgSetWidget(list, PG_WP_SELECTED, FALSE, 0);
>     pgUpdate();
> 
>     /* create the app bar for the top of the window */
>     appBar = pgNewWidget(PG_WIDGET_TOOLBAR, PG_DERIVE_INSIDE, app);
>     pgNewWidget(PG_WIDGET_LABEL, PG_DERIVE_INSIDE, appBar);
>     pgSetWidget(PGDEFAULT,
>               PG_WP_TEXT, pgNewString("Memo Pad"),
>               PG_WP_FONT, pgNewFont(NULL, 14, PG_FSTYLE_BOLD),
>               0);
>     pgSetWidget(appBar, PG_WP_SIDE, PG_S_TOP, 0);
> }
> 
> _______________________________________________
> Pgui-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/pgui-devel
> 

_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to