C (124/178)

From:Vincent Morenas
Date:25 Jul 2000 at 19:51:41
Subject:Re: Mui Multicolumn

Hello Rene

Le 24-Juil-00, Rene Hartmann a �crit:

> Hi, can anybody help me with an example from a multicolumn inputlist for
> mui ? Thank...
>
>
In SAS/C, i doing like that...
The hook definition that use the list to display the column

static LONG __asm DisplayLV_compteData (register __a2 char **,
register __a1 t_entete_compte *);

static struct Hook DisplayAccountHook = { { NULL, NULL },
(APTR) DisplayLV_compteData,
NULL,
NULL };

The set saying the list format, here 3 column definition each between comma
MIW=25 is for minimum witdh 25% P=\33c for center (look MUI_List.doc in
Autodoc of Developper MUI archive for MUIA_List_Format and
MUIA_List_DisplayHook for more information)
set (WI_compte->LV_compte, MUIA_List_Format, "BAR MIW=25 P=\33c,BAR MIW=25
P=\33c,P=\33r MIW=50");

Active the Hook
set (WI_compte->LV_compte, MUIA_List_DisplayHook, &DisplayAccountHook);

If you want tilte for each column
set (WI_compte->LV_compte, MUIA_List_Title, TRUE);
look for MUIA_List_Title for more detail on displaying tilte.

And finaly the hook that display tilte and data
static LONG __asm DisplayLV_compteData(register __a2 char **Array,
register __a1 t_entete_compte
*Account)
{
static char buf1[200],buf2[200],buf3[200];
if (Account)
{
Node_compte *Account1 = FindAccount (Account->Key);
*Array++ = Account->num_compte;
*Array++ = Account->libelle;
sprintf(buf1,"\33r%ld",Account1->Data->ListSize);
*Array =buf1;
}
else
{
sprintf(buf1,"\33b\33c%s\33n",GetMBString(MSG_STR_numero_compte));
sprintf(buf2,"\33b\33c%s\33n",GetMBString(MSG_STR_intitule));

sprintf(buf3,"\33b\33c%s\33n",GetMBString(MSG_STR_nombre_record_compte));

*Array++ = buf1;
*Array++ = buf2;
*Array = buf3;
}
return 0;
}

it could be enough.

Vincent MORENAS
South of france
PPCRULEZ

Regards

------------------------------------------------------------------------
It's the End Of The Line for My Shipping Broker.
http://click.egroups.com/1/5175/1/_/451227/_/964547510/
------------------------------------------------------------------------