KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Listbox locked columns limit
PRODUCT: 4D | VERSION: 18 | PLATFORM: Mac & Win
Published On: April 22, 2020

When deciding to lock columns in your listbox, keep in mind that there is a limit to the amount of locked columns that may exist. This limit depends on the total number of columns in your listbox. If the total number is N, then 4D will allow up to N-1 locked columns. For example, if your listbox has 5 total columns, then the maximum number of locked columns you may have is 4 (5 minus 1). When using LISTBOX SET LOCKED COLUMNS, if you pass a value in the numColumns parameter that is greater than N-1, it will be reduced automatically to the value N-1. This means that if you try to set 3 locked columns in a listbox with 3 total columns using the command, 4D will lock 2 columns. Note that this N-1 rule also applies to listboxes that have dynamically changing numbers of columns. Therefore, if your listbox is reduced to 1 column, it wll have 0 locked columns, even if it previously had locked columns.