Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 06-10-2005
OzzyzzO OzzyzzO is offline
Miembro
 
Registrado: may 2003
Ubicación: Argentina
Posts: 12
Poder: 0
OzzyzzO Va por buen camino
Thanks! Rounin. I think that your solution will help me. Very good explanation. Thanks again!

Saludos
__________________
Juan Pablo
Responder Con Cita
  #2  
Antiguo 06-10-2005
Avatar de vtdeleon
vtdeleon vtdeleon is offline
Miembro
 
Registrado: abr 2004
Ubicación: RD & USA
Posts: 3.236
Poder: 26
vtdeleon Va por buen camino
Saludos

Rounin, Sabes escribir en español?, Lo digo porque en este foro la gran mayoría hablamos(o escribimos) en español. Entonces los forista que consulten este hilo y tenga pocos conocimiento del ingles estarán despistado.

Ante todo, Es muy grata y muy buena tu ayuda (hasta a mi me has ayudado). Espero seguir viendote por aqui
__________________
Van Troi De León
(Not) Guía, Code vB:=Delphi-SQL, ¿Cómo?
Viajar en el tiempo no es teóricamente posible, pues si lo fuera, ya estarían aqui contándonos al respecto!
Responder Con Cita
  #3  
Antiguo 06-10-2005
rounin rounin is offline
Miembro
 
Registrado: sep 2005
Posts: 43
Poder: 0
rounin Va por buen camino
Saludos,

Estoy estudiando español,
(yo periodicamente voy en comisiones de servicio a España)
pero mi nivel de español no es bastante alto,
y lo escribir en español todavía es dificil para mi.
Lo siento.
Responder Con Cita
  #4  
Antiguo 06-10-2005
Avatar de vtdeleon
vtdeleon vtdeleon is offline
Miembro
 
Registrado: abr 2004
Ubicación: RD & USA
Posts: 3.236
Poder: 26
vtdeleon Va por buen camino
Saludos
Cita:
Empezado por rounin
pero mi nivel de español no es bastante alto,
Cómo va ser. Se entiende perfectamente
Cita:
Empezado por rounin
y lo escribir en español todavía es dificil para mi.
Aquí te serviría de práctica
__________________
Van Troi De León
(Not) Guía, Code vB:=Delphi-SQL, ¿Cómo?
Viajar en el tiempo no es teóricamente posible, pues si lo fuera, ya estarían aqui contándonos al respecto!
Responder Con Cita
  #5  
Antiguo 07-10-2005
rounin rounin is offline
Miembro
 
Registrado: sep 2005
Posts: 43
Poder: 0
rounin Va por buen camino
Saludos,

pienso que en tu caso necesita incluir flag csSubcomponent
en tus subcomponentes:

Código:
  TDigitalDisplay = class(TCustomPanel)
  private
	FImage1: TImage;
	FStaticText1: TStaticText;
	FPopupMenu1: TPopupMenu;
	{...}
  published
	property StaticText1: TStaticText read FStaticText1; {r/o}
	property Image1: TImage read FImage1;
	property PopupMenu1: TPopupMenu read FPopupMenu1;
	{...}
  end;
 
 
constructor TDigitalDisplay.Create(AOwner: TComponent);
 
   function CreateSubComponent(AClass: TComponentClass): TComponent;
   begin
	 Result := AClass.Create(Self);
	 Result.SetSubComponent(True); {!!!!!!!!}
	 Result.FreeNotification(Self); 
	 if Result is TControl then TControl(Result).Parent := Self;
   end;
 
var
  MenuItem: TMenuItem;
begin
  inherited;
  {...}
  FStaticText1 := CreateSubComponent(TStaticText) as TStaticText;
  FStaticText2 := CreateSubComponent(TStaticText) as TStaticText;
  FStaticText3 := CreateSubComponent(TStaticText) as TStaticText;
  FImage1	  := CreateSubComponent(TImage) as TImage;
  FPopupMenu1  := CreateSubComponent(TPopupMenu) as TPopupMenu;
 
  MenuItem := TMenuItem.Create(PopupMenu1);
  FPopupMenu1.Items.Add(MenuItem);

  with MenuItem do
  begin
	Caption := 'Configurar';
	OnClick := PopupConfigurar;
  end;

end;
 
procedure TDigitalDisplay.Notification(AComponent: TComponent; Operation: TOperation);
begin
  inherited;
  if (AComponent = FStaticText1) and (Operation = opRemove) then FStaticText1 := nil;
  if (AComponent = FStaticText2) and (Operation = opRemove) then FStaticText2 := nil;
  if (AComponent = FStaticText3) and (Operation = opRemove) then FStaticText3 := nil;
  if (AComponent = FPopupMenu1) and (Operation = opRemove) then FPopupMenu1 := nil;
  if (AComponent = FImage1)	 and (Operation = opRemove) then FImage1	 := nil;
end;
PS Porque creas subcomponentes en AfterConstruction?
Porque no en Create?
Responder Con Cita
  #6  
Antiguo 20-10-2005
OzzyzzO OzzyzzO is offline
Miembro
 
Registrado: may 2003
Ubicación: Argentina
Posts: 12
Poder: 0
OzzyzzO Va por buen camino
Lightbulb

Cita:
Empezado por rounin
PS Porque creas subcomponentes en AfterConstruction?
Porque no en Create?
Perdón por no contestar , estuve con mucho trabajo.

Los subcomponentes los creo en el metodo AfterConstruction porque en el constructor Create el componente aun no está creado y no puedo asignarle la variable Self a la propiedad Parent del subcomponente, ni tampoco pasarlo como Owner en la creación del subcomponente. O almenos eso entendí.

Saludos y éxitos con el español.
__________________
Juan Pablo
Responder Con Cita
  #7  
Antiguo 20-10-2005
rounin rounin is offline
Miembro
 
Registrado: sep 2005
Posts: 43
Poder: 0
rounin Va por buen camino
Puedes hacer eso en Create después inherited.
En este lugar el componente esta creado totalmente.
(sólo las propiedades no ya esta cargado de DFM y
la ventana no ya esta creado).

Última edición por rounin fecha: 21-10-2005 a las 12:51:23.
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

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:07: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