Simple Dynamaic Event Question
Posted on 2003-11-12
Ok, i'm sure this is very simple, but as it is i can't find it anywhere online, and i'm basically driving myself insane. currently i am creatign dynamic components and adding them to the surrent form, and all i want to do in the world is add an onClick handler to these compoents, the important code is below.
field := TTabSheet.create(self);
//create quizes tab
with field do
caption := 'Students';
PageControl := subjectPages[index];
Height := 425;
Width := 785;
with TStringGrid.Create(self) do
parent := field;
height := 425;
width := 785;
now i figured i could just do a onClick := "a procedure here"; and be done with it, but that hasn't worked very well, which is to say not at all. If anybody could just show me how this is done dynamically, in the code, without using the object inspector i would be quite pleased.