Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #5  
Antiguo 05-02-2008
RicardoNavarro RicardoNavarro is offline
Registrado
 
Registrado: ago 2006
Posts: 6
Poder: 0
RicardoNavarro Va por buen camino
Color de Message

A quien le Sirva

Código Delphi [-]
function MiMensaje(XTexto, XTitulo: String): Boolean;
var
  LForm: TForm;
  CaptionIndex, i: integer;
  LNombres: array of string;
  LFondo, LColor: TColor;
  LICono: TMsgDlgType;
  LBotones: TMsgDlgButtons;
begin
  LFondo := clGreen;
  LColor := clWhite;
  LIcono := mtInformation;
  LBotones := [mbOK];
  SetLength(LNombres, 1);
  LNombres[0] := '&Cerrar';
  if XTitulo = 'Cuidado' then
    begin
      LFondo := clYellow;
      LColor := clBlack;
      LIcono := mtConfirmation;
      LBotones := [mbYes,mbNo];
      SetLength(LNombres, 1);
      LNombres[0] := '&Si';
    end
  else if XTitulo = 'Peligro' then
    begin
      LFondo := clRed;
      LColor := clYellow;
      LIcono := mtWarning;
      LBotones := [mbYes,mbNo,mbAbort];
      SetLength(LNombres, 3);
      LNombres[0] := '&Si';
      LNombres[1] := '&No';
      LNombres[2] := '&Cerrar';
    end;
  LForm := CreateMessageDialog(XTexto, LIcono, LBotones);
  LForm.Caption := XTitulo;
  LForm.Color := LFondo;
  LForm.BorderIcons := [];
  CaptionIndex := 0;
  for i := 0 to LForm.ComponentCount - 1 do
    begin
      if (LForm.Components[i] is TLabel) then
        begin
          TLabel(LForm.Components[i]).Font.Style := [fsBold];
          TLabel(LForm.Components[i]).Font.Color := LColor;
          TLabel(LForm.Components[i]).Font.Size := 12;
        end;
      if (LForm.Components[i] is TButton) then
        begin
          if CaptionIndex > High(LNombres) then
            Break;
          TButton(LForm.Components[i]).Caption := LNombres[CaptionIndex];
          Inc(CaptionIndex);
        end;
    end;
  with LForm do
    begin
      try
        ShowModal;
      finally
        Free;
      end;
    end;
  if LForm.ModalResult = mrYes then
    Result := True
  else
    Result := False;
end;

Última edición por dec fecha: 05-02-2008 a las 16:17:38.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 04:33:25.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi