der denny aus de im www

Sie sind hier:   Startseite > Lazarus / Freepascal > TValueListEditor
Seitenanfang
Seite
Menü

TValueListEditor

Add Line

ValEdit.Strings.Add('MyValue=AValue');

 

Checkboxes

  with ValEdit.ItemProps['MyValue'] do
  begin
    KeyDesc := 'MyValue: PickList';  //optional description
    EditStyle := esPickList;
    ReadOnly := True;  //user cannot add options to dropdownlist
    PickList.Add('AValue');
    PickList.Add('AnotherValue');
end;

 

Sample

procedure TForm1.FormCreate(Sender: TObject);
var
  ir : INTEGER;
  dropList : TStrings;
begin
  dropList := TStringList.Create;
  TRY
    ir := dropList.Add('Yes');
    ir := dropList.Add('No');
    WITH ValueListEditor1 DO
    BEGIN
      ir := InsertRow('Key1','123,456',TRUE);
      ItemProps['Key1'].EditStyle := esSimple;
      ItemProps['Key1'].EditMask := '###,###';
      ir := InsertRow('Key2','Value2',TRUE);
      ItemProps['Key2'].EditStyle := esPickList;
      ItemProps['Key2'].PickList.Assign(dropList);
    END {WITH};
  FINALLY
    dropList.Free;
  END {TRY - FINALLY};
end;

 

Delete all

ValEdit.Strings.Clear;

 

Seitenanfang
Seite
Menü
Seitenanfang
Seite
Menü

Powered by CMSimple | Template: ge-webdesign.de | Login