Probe lo que me pasate aunque no lo entendí del todo.
Pero no resultó.
Estuve viendo el tema, pero no encuantro como hacer para asignar el nombre del proc al boton, el nombre del proc lo tengo como str en una db,
Al ser un str no me da error, alguna otra ides?
Les paso parte de mi codigo a ver si se les ocurre algo
Código Delphi
[-]
procedure TfrmConsulta.CreoBotones;
var
NuevoBoton: TSCButton;
begin
with zQryBusca do
begin
SQL.Clear;
SQL.Add('SELECT *');
SQL.Add('FROM BOTONES');
SQL.Add('WHERE MODULO=' + IntToStr(Modulo));
SQL.Add('ORDER BY ORDEN DESC');
Open;
First;
while not Eof do
begin
NuevoBoton := TSCButton.Create(self);
with NuevoBoton do
begin
Parent := PanelInf;
Align := alLeft;
with zQryFormat do
begin
SQL.Clear;
SQL.Add('SELECT *');
SQL.Add('FROM TIPOS');
SQL.Add('WHERE TIPO=''BOTON''');
Open;
Font.Name := FieldByName('FONT').AsString;
Font.Size := FieldByName('FONT_WIDTH').AsInteger;
if FieldByName('BOLD').AsInteger = 1 then
Font.Style := [fsBold];
Close;
end;
Style := cmdBusca1.Style;
Width := FieldByName('WIDTH').AsInteger;
Color := StringToColor(FieldByName('COLOR').AsString);
Name := FieldByName('NAME').AsString;
Caption := FieldByName('CAPTION').AsString;
end;
Next;
end;
end;
end;