Hi Peter,

Sounds like your top level rows have columns populated with data inbetween
blank data (columns 7&9)
I would recommend re-ordering the rows so that 7&9 become 6&7.

APPEND TO ARRAY ($aptr_HierarchyList; ->Column_1)
APPEND TO ARRAY ($aptr_HierarchyList; ->Column_2)
APPEND TO ARRAY ($aptr_HierarchyList; ->Column_3)
APPEND TO ARRAY ($aptr_HierarchyList; ->Column_4)
APPEND TO ARRAY ($aptr_HierarchyList; ->Column_5)
APPEND TO ARRAY ($aptr_HierarchyList; ->Column_6)
APPEND TO ARRAY ($aptr_HierarchyList; ->Column_7)
LISTBOX SET HIERARCHY(*;$vT_ListboxName;True;$aptr_HierarchyList->)

I also like to set the background colour of top level rows to a light grey
and set the font style to bold, using:

$vL_ColumnCount:=Size of array($aptr_HierarchyList->)
For ($vL_ColumnNum;1;$vL_ColumnCount)
   OBJECT SET RGB
COLORS($aptr_HierarchyList->{$vL_ColumnNum}->;$vL_BlackColour;$vL_LightGreyColour)
  OBJECT SET FONT STYLE($aptr_HierarchyList->{$vL_ColumnNum}->;Bold)
End for   //($vL_ColumnNum;1;$vL_ColumnCount)



Adam Bevan
Developer & CEO, Argus Productions Inc.
<https://www.facebook.com/ArgusProductions/>



On Mon, 29 Jul 2019 at 16:47, Peter Mew via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Hi
> I havent used this kind of listbox before so a few pointers would be
> gratefully received.
> At the moment my listbox contains 9 columns, some hidden, some not.
> One of the arrays holds information as to whether a row is designated as
> "start" or "end"
> If a row is designated as "Start", columns 1,2,3,4,5,7.9 are populated the
> remaining columns are ""
> if a row is designtaed as "End", columns 6,8,9 are populated the remaining
> columns are ""
> I want the start columns to be the top level, and the end columns to be the
> second level of the hierarchy.
> So I can collapse the rows to show only the top level rows (starts), or
> expand the rows to show the top level rows with the second level rows
> underneath them, sorted in chronological order.
> Start
> End
> Start
> End
> .......
> Is what I'm asking even possible and if so how do I go about it.
> I considered using ListBox Set Row Height and setting the row height to 0,
> so as not to display it. but this command is not available in v13
> thanks for any help
>
> -pm
> 4D v13.6  Mac OS High Sierra
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to