If this is not the appropriate place to post questions about using
PicoGUI, please let me know.

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.

2) On a similar note, I want to put my application name in a box at the
top of the screen.  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.

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

Reply via email to