Thanks Jeremy,

> Le 16 sept. 2017 à 03:32, Jeremy French via 4D_Tech <[email protected]> a 
> écrit :
> 
> It's better to use an object name in place of a pointer. That's because a 
> pointer could reference more than one object on the form. Object names are 
> unique and so reference only a single object.

I began with object name and after tried with variable name ; I copied the code 
after modification.
> 
> Here are a couple of things you might try.
> 
> ...
> 
> Try #3
> =====
> 
> Set the listbox column widths **after** you make SLQ SELECT calls.

I do that.


> Le 16 sept. 2017 à 13:08, Arnaud de Montard via 4D_Tech 
> <[email protected]> a écrit :
> 
> 
>> Le 16 sept. 2017 à 03:32, Jeremy French via 4D_Tech <[email protected]> a 
>> écrit :
>> 
>> [...]
>> See "Displaying the result of an SQL query in a list box” at:
>> http://doc.4d.com/4Dv16R3/4D/16-R3/Managing-List-Box-Objects.300-3218275.en.html#429187
>>  
>> <http://doc.4d.com/4Dv16R3/4D/16-R3/Managing-List-Box-Objects.300-3218275.en.html#429187>
> 
> It says "for example, the fifth column, its name is sql_column5 and its 
> header name is sql_header5" but doesn't mention that, if a second listbox is 
> filled the same (SELECT...INTO LISTBOX), 4D restarts objects naming from 1 so 
> you get duplicate names in the form. 
> 
> Duplicate names can also be obtained with LISTBOX INSERT COLUMN, while doc 
> says "Note: Object names must be unique in a form. You must be sure that the 
> names passed in the colName, headerName and footerName parameters are not 
> already used. Otherwise, the column is not created and an error is generated."
> <http://doc.4d.com/4Dv16R3/4D/16-R3/LISTBOX-INSERT-COLUMN.301-3218314.en.html>
> 
> Knowing the listbox name unicity is correctly ensured by 4d in the form, I 
> create names with listbox name as prefix:
>  myLB
>  myLB_h1, myLB_h2... headers
>  myLB_c1, myLB_c2... columns
>  myLB_f1, myLB_f2... footers
> <http://forums.4d.com/Post/FR/19409974/1/19409975#19410038>
> So obvious. 
> 
> -- 
> Arnaud 

Thanks Arnaud, you were right ; it's an issue with object names => it's a bug.
When applying your solution, I had mistyped something.
Now, it is OK.

Best regards
Bernard Escaich

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to