Author | Message | Time |
---|---|---|
PaiD | Ok I am tring to port Grok's AddC in VB Function into Delphi. I got close but not to close >.< Here is what I have. (I cant find out how to Array it to allow many colors) [code] procedure TfrmMain.AddC(Color: Integer; Text: String); begin frmMain.Chat.SelStart := Length(frmMain.Chat.Text); frmMain.Chat.SelLength := 0; frmMain.Chat.SelAttributes.Color := Color; frmMain.Chat.SelText := Text; frmMain.Chat.SelStart := Length(frmMain.Chat.Text); frmMain.Chat.Seltext := #10; end; [/code] Usage: AddC(clYellow,'Delphi Chat'); AddC(clLime,'Version: 1.0'); AddC(clRed,'By Savior'); Also I had to add 'Seltext := #10' so it would drop to the other line. Any help/ideas would be nice :) | August 4, 2005, 6:16 AM |