XPan Sheet

...I try the hint for top item and select without result (ref is item id?)..
I experienced also something weird
with this in hint
XpSHEETTOPITEM( ID_BUFF, 1 ),
XpSHEETSELECT( ID_BUFF, 1),
no result in sheet but this does inhibit the following
XpBUTNOTIFY(...)

Denis.
 
Last edited:
XpSHEETTOPITEM() requires reference (i.e. LWXPanelSheetItemRef) not index.

XpSHEETSELECT() requires three parameters, not two.

Are you using C++ or C?
In C++ you should make class SheetEntry {} with dynamic-list (getCount(),getByIndex()). If getCount()==0, entry is leaf, otherwise it's branch. Return C++ object pointer as LWXPanelSheetItemRef.
 
Yes for ref, I tried it first, no difference,
but I found XpSHEETSELECT(cid,x)?
x: 0-not selected; 1-selected; -1-toggle selection
of course this is not sufficient for initialysing a selection.
but this is probably why this corrupts the hint
Initialysing a selection isn't usefull for me.


Whatever the way you manage your item list,
as I said for experimenting my tree is simple, a single list is enough
first my parent, then children
I may be wrong but I don't think that making our own node structure
like for classic panel is necessary.
But I don't exclude thart I missed an important element in this setup.

getitemcount()
first return all
other 0
getitemsub()
returning a ref based on the child index (the parent is child 0)
not using subitemtype (?)
doesn't work at the first level0
(I can't post the visual result, but the parent has an Arrow
set as collapsed, then children not justified, probably not correctly defined)

but at the second
getitemcount()
first return 2
second return other including itself
other 0
getitemsub()
return child as ref for first
return child+2 for for second
returning a ref based on the child index
thats works but annoying.



Denis.
 
Last edited:
Oh, I see where is discrepancy..

In LWSDK we have:

XpSHEETSELECT( ctlID, ref, state )
Set the selection state of a particular item in a sheet control. Each row is assoicated with an reference to an item. The state determines if the item is not selected (0), selected (1), or toggled (-1). If the ref is NULL, then all items are affected.

but in includes there is:

/* (state, [0+]LWXPanelSheetItemRef) Selection state of an optional list of items (no items implies All items). x: 0-not selected; 1-selected; -1-toggle selection */
#define XPTAG_SHEET_SELECT XpHTAG(378,2,1)
#define XpSHEETSELECT(cid,x) XPTAG_SHEET_SELECT, XpH(cid), XpH(x)


So header file mismatch what is documentation..

Three args in LWSDK, two args in includes..
 
I experienced also something weird
with this in hint
XpSHEETTOPITEM( ID_BUFF, 1 ),
XpSHEETSELECT( ID_BUFF, NULL, 1),
no result in sheet but this does inhibit the following
XpBUTNOTIFY(...)

Modify header file in includes to:

#define XpSHEETSELECT(cid,ref,x) XPTAG_SHEET_SELECT, XpH(cid), XpH(ref), XpH(x)

and try again..
 
XpSHEETTOPITEM( ID_BUFF, (LWXPanelSheetItemRef)1 ),
XpSHEETSELECT( ID_BUFF, (LWXPanelSheetItemRef)2, 1),

No effect and the second one still corrupting the hint.
But this is facultative for me,
the mouse selection works.

Denis.
 
Finally I will use
a single list of items in a sheet without hierarchy,
works well in both version 1 & 2,
this is enough for a gain of space in the panel.

Thanks for help,
Denis.
 
Back
Top