oi10:presentation_server:initstorage_method_listbox

INITSTORAGE method (Listbox)

This method is used to pre-allocate a block of memory before items are added to the list. It can help to speed up the initialization of ListBox controls that have a large number of items.

nAdded = Exec_Method( CtrlEntID,     

                         "INITSTORAGE", 

                         nAdded,        

                         nBytes )
 
NameRequiredDescription
nItemsYesSpecifies the number of items to add
nBytesYesSpecifies the number of bytes (not items) to allocate for strings

If the method is successful, the return value is the total number of items for which memory has been pre-allocated, that is, the total number of items added by all successful INITSTORAGE calls.

If the method fails a value of "-1" is returned.

N/A

 
//// Example: Allocate space for 1000 items with 100 bytes of storage each//
   
   Call Exec_Method( @Window : ".LST_NAMES", "INITSTORAGE", 1000, 100 )
 
 
 

LISTBOX LIST property, LISTBOX INSERT method

  • oi10/presentation_server/initstorage_method_listbox.txt
  • Last modified: 2023/10/25 10:49
  • by 127.0.0.1