Ver Mensaje Individual
  #4  
Antiguo 17-06-2011
AndyLupa AndyLupa is offline
Miembro
 
Registrado: ene 2006
Posts: 25
Reputación: 0
AndyLupa Va por buen camino
Question Ok

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;

{Tambien en la DB tengo un campo con el nombre del proc que debe ejecutar el boton en el cliec
El tema es como asignar este valor
}
      end;
      Next;
    end;
  end;
end;



Última edición por roman fecha: 17-06-2011 a las 18:52:24.
Responder Con Cita