I think I express myself in a prety bad way.
The application will create the button dynamically based on a search of a database, let's say I have 5 diferent "languagues" in the database, so I'll have five buttons, one for each panel, the caption will folow the database order, like id 0 = EN_US, id 1 = PT_BR and so on, will be a procedure or function, because there is a field to add more "languages", so I need a way to update the application in real time if necessary.
For this time, I'm trying to fix a weird code that I've done some time ago, so I've created this button in the regular way (by hand inside Lazarus), a array of button or a button list will not make any "visual diference" considering that I'll use procedures and function to control their behavior.
All this buttons will use procedures with their names like a "trigger", one code to all and all of them with diferent names, I'm just tring to change the Font.Style in a "lazy" way, to avoid the creation of the buttons inside of a array / list for now (until I fix the overall code).
By "groups", I don't realy mean a "mathematical" group, it's just a "expression" to "express" a division of "interactions" that I have, the C1 button belongs to the group "C" by the name, like the P1...P5 belong tho the group "P" and so on.
The overal concept of the ending application:
Form create
begin
"var limiter" := {read database infomation: number of buttons to be created or read it from a .ini file << Easier way I guess};
procedure createButtons ("C")
procedure createButtons ("P")
procedure createButtons ("V")
end;
procedure createButtons (groupName:Char)
var
//array info
btnArray : [1... "limiter"] of Integer;
//not sure if this will work btw
groupName : btnArray;
i : Integer;
btnName : String;
begin
//I'll use a panel just called "C", "P", "V" to define the placement of the buttons, thats why I've asked about child / parent
while i <> of limiter begin
btnName := groupName+IntToString(i);
create button inside panel "grupName"
button code (
procedure bold (btnName); //to get the first letter, like "C"
procedure "another example" (btnName);
)
button information (
width, heigth, align, etc
)
i:=i+1;
end;
end;
procedure bold (btnName:String);
btnChar : TButton;
btnNum : Integer;
begin
btnChar := Copy (btnName.Name, 1,1);
while i <> of limiter begin
"C"+btnNum.Font.Style := []; //to all of them
end;
btnName.Font.Style:= [fsBold, fsItalic];
end;
(Sorry for my child example, my head it's out of place at this moment, this is the best I can do now)
Like C, P or V have a "unlimited" number of elements that can be created, I'm trying to figure out a way to set the "select button from" to a small list, even because I need to set five or maybe seven procedures for each button.
I'm realy sorry for my bad explanation on my first post, I'll try to have a better explanation next time.