Hallo,
Ik heb dat nog even nagegaan. Ik begrijp niet het probleem dat jij vindt door gebruik te maken van StringManager. Wat ik me wel afvraag is waarom je een CheckListBox gebruikt als je een waarde in Edit2.Text wil zetten. Als je meer waarden in de CheckListBox aanvinkt dan krijg je niet de gewenste waarde in Edit2. Ik neem aan dat je via een selectie in CheckListBox de waarde moet kunnen aanpassen. Ik heb in werkend voorbeeld gemaakt. Dit geeft geen foutmeldingen met StrMan;
Code:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, CheckLst, StrMan;
type
TForm1 = class(TForm)
CheckListBox1: TCheckListBox;
Edit1: TEdit;
Label1: TLabel;
procedure CheckListBox1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.CheckListBox1Click(Sender: TObject);
Var
T : Integer;
Artikel : String;
Prijs : String;
Begin
For T:= CheckListBox1.Items.Count-1 DownTo 0 do
If CheckListBox1.Checked[T] then
Begin
Artikel:=CheckListBox1.Items.Strings[T];
Prijs:=Sm.Purge(Artikel,['A'..'z']);
Prijs:=Sm.After(',',Prijs);
Artikel:=Sm.Before(',',Artikel);
Label1.Caption:=Artikel;
Edit1.Text:=Prijs;
End;
End;
End.
Bookmarks