Recent

Author Topic: How to load the TValueListEditor Keys and values in a single move  (Read 107 times)

jamie

  • Hero Member
  • *****
  • Posts: 1922
How to load the TValueListEditor Keys and values in a single move
« on: September 11, 2019, 06:02:35 pm »

 I seem to have an issue compacting some code here.

 If I use
Code: Pascal  [Select]
  1. valueListEditor1.Strings.CommaText := 'one,two,three';
  2.  

This loads only the Value column and also adds the required entries which I like at the same time.

 How can I format this text to force it to load the KEY names ?

 I can use the COL[0].Strings := '.....'; and that works but it starts at the title and overwrites that but does not ensure  rows exist for them. I know I can include the title in the list but.
 
 Other then looping through the KEYS array there must be a better way?


jamie

  • Hero Member
  • *****
  • Posts: 1922
Re: How to load the TValueListEditor Keys and values in a single move
« Reply #1 on: September 11, 2019, 06:11:09 pm »
Sorry, I figured it out...

I need the "=" in it.

 'Keyname=ValueName,.....

 Sorry for the noise

jamie

  • Hero Member
  • *****
  • Posts: 1922
Re: How to load the TValueListEditor Keys and values in a single move
« Reply #2 on: September 11, 2019, 07:19:39 pm »
It does not seem I am out of the woods yet..

 The NameValueSeparator := ' '; // Space.  does not seem to work.
 
 I wanted to be able to use the "=" in the key field but I guess that isn't going to work because using a SPACE for the separator is being ignored.
I'll need to come up with some other unused character then.
 Any one know how to produce a #127 with a single keystroke ?

« Last Edit: September 11, 2019, 07:24:23 pm by jamie »