The TEST_LB function, called from the CLICK event of the B_POPULATE button, populates the list box. Create this function in the System Editor by copying the code below:

function test_lb(CtrlId, Event)
 
*declare all the subroutines and functions that are used
declare subroutine Set_Property, Send_Message, Repository
declare function Send_Message, Get_Property
 
*Tab character will be used as a separator
equ TAB$ to \09\
 
*Get the name of the window
winId = CtrlId [1, '.']
 
*Get the name of the control
ctrlName = CtrlId [col2()+1, \00\]
 
begin case
 
   case ctrlName = 'B_POPULATE'
   *populate list box with static tabbed content when button clicked
   content = ''
   content<1> = 'OpenInsight'
   content<2> = TAB$: 'Tech Notes'
   content<3> = TAB$:TAB$: 'Hierarchical List Boxes Part 1'
   content<4> = TAB$:TAB$: 'Hierarchical List Boxes Part 2'
   content<5> = TAB$: 'White Papers'
   content<6> = TAB$:TAB$: 'How to Get to the Web With OpenInsight'
   Set_Property(WinId: '.LB_H', 'LIST', content)
 
end case
 
return 0
  • No labels