If you are trying to use the listitem widget from a client application,
this code won't be very helpful. The interface used within pgserver itself
is different than the client's interface.

The listitem widget is just a button with customized appearance and default
flags, so it will work just like a button. Because they are mutually
exclusive by default, you will want to put all your listitems inside a box
widget. To scroll them, you will need to attach a scrollbar to the box. For
a good example to this, look at the source code to the font picker dialog
in cli_c/src/dlg_fontpicker.c

On 2001.08.24 00:55:24 -0600 [EMAIL PROTECTED] wrote:
> Hi everyone, i need to use listitem object, i tried to find some examples
> but 
> i only found the code below and i couldn't achieve to make it useful for
> me..
> 
> if anyone can give me assistance about this i would appreciate that..
> 
> 
> #include <pgserver/common.h>
> #include <pgserver/widget.h>
> 
> g_error listitem_install(struct widget *self) {
>   g_error e;
> 
>   /* Start with a button */
>   e = button_install(self);
>   errorcheck;
> 
>   /* Customize */
>   customize_button(self,PGTH_O_LISTITEM,PGTH_O_LISTITEM_ON,
>                  PGTH_O_LISTITEM_HILIGHT,NULL,NULL);
> 
>   /* We need extra events */
>   widget_set(self,PG_WP_EXTDEVENTS,PG_EXEV_TOGGLE | PG_EXEV_EXCLUSIVE);
> 
>   /* Stack vertically */
>   widget_set(self,PG_WP_SIDE,PG_S_TOP);
> 
>   return sucess;
> }
> 
> _______________________________________________
> Pgui-devel mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/pgui-devel
> 
-- 
Only you can prevent creeping featurism!

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

Reply via email to