unit XX;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Main;
type
TComponentList = class(TForm)
ListBox1: TListBox;
procedure ListBox1Click(Sender: TObject);
private
public
end;
var
ComponentList: TComponentList;
implementation
{$R *.DFM}
procedure TComponentList.ListBox1Click(Sender: TObject);
var
i:Integer;
MyName:string;
MyObject:TObject;
begin
ListOfSelectedObjects.UnSelect;
MyName:='';
for i:=0 to ListBox1.Items.Count-1 do
if ListBox1.Selected[i] then MyName:=ListBox1.Items[i];
if MyName='' then ShowMessage('Greska : Ime nije pronadjeno);
MyObject:=GetObjectByName(MyName);
MyObject.Select;
MyObject.Draw;
end;
end.interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Main;
type
TComponentList = class(TForm)
ListBox1: TListBox;
procedure ListBox1Click(Sender: TObject);
private
public
end;
var
ComponentList: TComponentList;
implementation
{$R *.DFM}
procedure TComponentList.ListBox1Click(Sender: TObject);
var
i:Integer;
MyName:string;
MyObject:TObject;
begin
ListOfSelectedObjects.UnSelect;
MyName:='';
for i:=0 to ListBox1.Items.Count-1 do
if ListBox1.Selected[i] then MyName:=ListBox1.Items[i];
if MyName='' then ShowMessage('Greska : Ime nije pronadjeno);
MyObject:=GetObjectByName(MyName);
MyObject.Select;
MyObject.Draw;
end;
end.
What does this short code do?
Started by Java_Chick, Jul 21 2008 03:03 AM
18 replies to this topic
#1
Posted 21 July 2008 - 03:03 AM
Could someone explain me what does this code do?
|
|
|
#2
Posted 21 July 2008 - 07:38 AM
It's almost impossible to tell without have the .dfm code as well. It appears to go through a list of names that correspond to objects in a list and show the one that was clicked on.
#3
Posted 21 July 2008 - 08:20 AM
Ok, thanks.And, how about this one:
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, Main;
type
TDlgConf = class(TForm)
CheckBox2: TCheckBox;
RadioGroup1: TRadioGroup;
CheckBox3: TCheckBox;
Button1: TButton;
procedure CheckBox2Click(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
procedure CheckBox3Click(Sender: TObject);
private
public
end;
implementation
{$R *.DFM}
procedure TDlgConf.CheckBox2Click(Sender: TObject);
begin
SelectLineWithNodes:=CheckBox2.Checked;
end;
procedure TDlgConf.RadioGroup1Click(Sender: TObject);
begin
LineWithComponent:=RadioGroup1.ItemIndex;
if LineWithComponent=1 then
begin
CheckBox2.Checked:=True;
SelectLineWithNodes:=CheckBox2.Checked;
end;
end;
procedure TDlgConf.CheckBox3Click(Sender: TObject);
begin
AutoConnect:=CheckBox3.Checked;
end;
end.
#4
Posted 21 July 2008 - 08:43 AM
Why are you asking us to identify random code for you? Learn the language and then you won't have to ask other people to do your work for you.
#5
Posted 21 July 2008 - 08:46 AM
This is help and support, and I don't have intention to explain why I need it.
If you don't know, you aren't in obligation to reply.
If you don't know, you aren't in obligation to reply.
#6
Posted 21 July 2008 - 08:48 AM
I never said I was obligated to reply.
I am simply saying that posting code asking people to tell you what it does makes you look like a skiddy.
How is that for an explanation?
I am simply saying that posting code asking people to tell you what it does makes you look like a skiddy.
How is that for an explanation?
#7
Posted 21 July 2008 - 08:52 AM
I don't care?
I need help with it, in a short period, think I care for reputation?
I need help with it, in a short period, think I care for reputation?
#8
Posted 21 July 2008 - 08:55 AM
Did I ask if you cared? I am just simply saying that is how you look.
And from what you have said so far it looks like you are some skiddy or just some college kid that was too lazy to do their computer science homework on time.
So now you are falling back on some coders at a forum to bail you out.
And from what you have said so far it looks like you are some skiddy or just some college kid that was too lazy to do their computer science homework on time.
So now you are falling back on some coders at a forum to bail you out.
#9
Posted 21 July 2008 - 08:58 AM
I'm in high school, and that really is the situation :)
#10
Posted 21 July 2008 - 09:09 AM
Okay, well now that you aren't hiding that anymore, lol.
#11
Posted 21 July 2008 - 11:00 AM
Hm, I can't remember what I put in my profile as an age information, but in every case, yep, I'm a lazy high school "skiddy" :P
#12
Posted 21 July 2008 - 11:03 AM
Well do you plan on pursuing programming as a career?
If so you are a lot better off learning the language now and not being lazy about it, because you'll be much better off later on.
If so you are a lot better off learning the language now and not being lazy about it, because you'll be much better off later on.


Sign In
Create Account


Back to top









