<!-- $XConsortium: LstSeleB.sgm /main/8 1996/09/08 20:52:08 rws $ -->
<!-- (c) Copyright 1995 Digital Equipment Corporation. -->
<!-- (c) Copyright 1995 Hewlett-Packard Company. -->
<!-- (c) Copyright 1995 International Business Machines Corp. -->
<!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
<!-- (c) Copyright 1995 Novell, Inc. -->
<!-- (c) Copyright 1995 FUJITSU LIMITED. -->
<!-- (c) Copyright 1995 Hitachi. -->

<RefEntry Id="CDEMMA.MAN309.rsml.1">
<RefMeta>
<RefEntryTitle>XmListSelectPos</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>XmListSelectPos</Function></RefName>
<RefPurpose>A List function that selects an item at a specified position in the list
<IndexTerm>
<Primary>XmListSelectPos</Primary>
</IndexTerm><IndexTerm>
<Primary>List functions</Primary>
<Secondary>XmListSelectPos</Secondary>
</IndexTerm></RefPurpose>
</RefNameDiv>
<!-- -->
<!-- @OSF_COPYRIGHT@-->
<!-- COPYRIGHT NOTICE-->
<!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.-->
<!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for-->
<!-- the full copyright text.-->
<!-- -->
<!-- HISTORY-->
<!-- -->
<!-- **-->
<!-- **-->
<!-- **  (c) Copyright 1989, 1990, 1992 by Open Software Foundation, Inc.-->
<!-- **      All Rights Reserved.-->
<!-- **-->
<!-- **  (c) Copyright 1987, 1988, 1989, by Hewlett-Packard Company-->
<!-- **-->
<!-- **-->
<RefSynopsisDiv>
<FuncSynopsis>
<FuncSynopsisInfo>#include &lt;Xm/List.h>
</FuncSynopsisInfo>
<FuncDef>void <Function>XmListSelectPos</Function></FuncDef>
<!--<ParamDef><Replaceable>widget, position, notify</Replaceable></ParamDef>-->
<ParamDef>Widget <Parameter>widget</Parameter></ParamDef>
<ParamDef>int <Parameter>position</Parameter></ParamDef>
<ParamDef>Boolean <Parameter>notify</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para><Function>XmListSelectPos</Function> highlights a List item at the specified position
and adds it to the list of selected items.
<!--.zA "defect,5037,R2.0,"XmListSelect+([Item|Pos]) is incomplete"
&bsol;*LXmListSelectPos&bsol;*O lets an application program (as opposed to a user)
select an item from a list.  This function is similar to &bsol;*LXmListSelectItem&bsol;*O;
the only difference is that &bsol;*LXmListSelectPos&bsol;*O selects through numerical
order while &bsol;*LXmListSelectItem&bsol;*O selects by name.
.PP
The outcome of the &bsol;*LXmListSelectPos&bsol;*O
call depends on the value of the &bsol;*LXmNselectionPolicy&bsol;*O resource.
When &bsol;*LXmNselectionPolicy&bsol;*O is &bsol;*LXmSINGLE_SELECT&bsol;*O,
&bsol;*LXmBROWSE_SELECT&bsol;*O, or
&bsol;*LXmEXTENDED_SELECT&bsol;*O with &bsol;*Vnotify&bsol;*O set to True,
&bsol;*LXmListSelectPos&bsol;*O selects and highlights the
given item and deselects all other items in the List.
When &bsol;*LXmNselectionPolicy&bsol;*O is &bsol;*LXmMULTIPLE_SELECT&bsol;*O,
or is &bsol;*LXmEXTENDED_SELECT&bsol;*O with &bsol;*Vnotify&bsol;*O set to False,
&bsol;*LXmListSelectPos&bsol;*O toggles the selection state of the given item
without changing the selection state of other items in the List.
.zZ "defect,5037,R2.0,"XmListSelect+([Item|Pos]) is incomplete"
--></Para>
<VariableList>
<VarListEntry>
<Term><Symbol Role="Variable">widget</Symbol></Term>
<ListItem>
<Para>Specifies the ID of the List widget.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">position</Symbol></Term>
<ListItem>
<Para>Specifies the position of the item to be selected.
A value of 1 indicates that the first item in the list is selected; a
value of 2 indicates that the second item is selected; and so on.
A value of 0 (zero) indicates that the last item in the list is selected.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">notify</Symbol></Term>
<ListItem>
<Para>Specifies a Boolean value that when TRUE invokes the selection callback
for the current mode. From an application interface view, calling this
function with <Symbol Role="Variable">notify</Symbol> True is indistinguishable from a user-initiated
selection action.
When <Symbol Role="Variable">notify</Symbol> is FALSE, no callbacks are called.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<Para>For a complete definition of List and its associated resources, see
&cdeman.XmList;.
</Para>
</RefSect1>
<RefSect1>
<Title>RELATED</Title>
<Para>&cdeman.XmList; and
&cdeman.XmListSelectItem;.
</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.09 7/2/95-->
