IDE se cierra cuando abro form
Publicado por eloisa (19 intervenciones) el 02/08/2007 22:03:46
Hola!!!!
No se que sucede con mi componente.
Cree un componente el cual coloco en una form, hasta ahi todo va bien pero ahora he creado un nueva forma que hereda de esta y al intentar abrirla se cierra todo el IDE sin mas ni mas, ni siquiera me pregunta si deseo guardar los cambios.
Estuve probando y alquitarle el componente ya funciona bien así que debo tener un error en el componente.
Pongo el código de los métodos en los que creo q podría estar el problema ya que los demas son solo GETS y SETS.
Sorry por tanto codigo :$.
De antemano GRACIAS !!!!.
procedure Register;
begin
RegisterComponents('Issste', [TQuestionPanel]);
end;
procedure TQuestionPanel.SetComponentsColor(Value: TColor);
begin
FComponentsColor := Value;
FComboBoxQuestion.Color := FComponentsColor;
FDateCheckQuestion.Color := FComponentsColor;
FDateQuestion.Color := FComponentsColor;
FSpecificationQuestion.Color := FComponentsColor;
end;
procedure TQuestionPanel.SetCharCase(Value: TEditCharCase);
begin
if FCharCase <> Value then
begin
FCharCase := Value;
FSpecificationQuestion.CharCase := FCharCase;
end;
end;
procedure TQuestionPanel.SetDude(Value: Boolean);
begin
FDude := Value;
if((FComboBoxQuestion.Items.Count = 3) and (FDude = False)) then
FComboBoxQuestion.Items.Delete(2)
else
if((FComboBoxQuestion.Items.Count = 2) and (FDude = True)) then
FComboBoxQuestion.Items.Add('?');
end;
procedure TQuestionPanel.SetupInternalComponents;
begin
FComboBoxQuestion := TComboBox.Create(Self);
FComboBoxQuestion.Parent := Self;
FDateCheckQuestion := TCheckBox.Create(Self);
FDateCheckQuestion.Parent := Self;
FDateQuestion := TDateTimePicker.Create(Self);
FDateQuestion.Parent := Self;
FSpecificationQuestion := TEdit.Create(Self);
FSpecificationQuestion.Parent := Self;
FComboBoxQuestion.Width := 40;
FDateCheckQuestion.Width := 10;
FDateQuestion.Width := 90;
FDateCheckQuestion.Top := 7;
FDateCheckQuestion.Left := FComboBoxQuestion.Left + FComboBoxQuestion.Width + 5;
FDateQuestion.Left := FDateCheckQuestion.Left + FDateCheckQuestion.Width + 2;
FSpecificationQuestion.Left := FDateQuestion.Left + FDateQuestion.Width + 5;
FSpecificationQuestion.Width := Width - 152;
FSpecificationQuestion.CharCase := ecUpperCase;
FComboBoxQuestion.ParentFont := False;
FDateQuestion.ParentFont := False;
FSpecificationQuestion.ParentFont := False;
FDude := False;
end;
procedure TQuestionPanel.CreateWnd;
begin
inherited;
FComboBoxQuestion.Items.Add('SI');
FComboBoxQuestion.Items.Add('NO');
if(FDude = True) then
FComboBoxQuestion.Items.Add('?');
FComboBoxQuestion.OnChange := ComboBoxQuestionChange;
FComboBoxQuestion.OnSelect := ComboBoxQuestionChange;
FComboBoxQuestion.OnKeyDown := ComboBoxQuestionKeyDown;
FComboBoxQuestion.OnKeyPress := ComboBoxQuestionKeyPress;
FDateCheckQuestion.OnClick := DateCheckQuestionClick;
EnabledDateAndSpecification;
end;
procedure TQuestionPanel.SetEnabled(Value: Boolean);
begin
inherited SetEnabled(Value);
FComboBoxQuestion.Enabled := Enabled;
FDateCheckQuestion.Enabled := Enabled;
FDateQuestion.Enabled := Enabled;
FSpecificationQuestion.Enabled := Enabled;
end;
constructor TQuestionPanel.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Height := 21;
Width := 300;
Caption := '';
BevelOuter := bvNone;
FCharCase := ecUpperCase;
FComponentsColor := clWindow;
SetupInternalComponents;
end;
No se que sucede con mi componente.
Cree un componente el cual coloco en una form, hasta ahi todo va bien pero ahora he creado un nueva forma que hereda de esta y al intentar abrirla se cierra todo el IDE sin mas ni mas, ni siquiera me pregunta si deseo guardar los cambios.
Estuve probando y alquitarle el componente ya funciona bien así que debo tener un error en el componente.
Pongo el código de los métodos en los que creo q podría estar el problema ya que los demas son solo GETS y SETS.
Sorry por tanto codigo :$.
De antemano GRACIAS !!!!.
procedure Register;
begin
RegisterComponents('Issste', [TQuestionPanel]);
end;
procedure TQuestionPanel.SetComponentsColor(Value: TColor);
begin
FComponentsColor := Value;
FComboBoxQuestion.Color := FComponentsColor;
FDateCheckQuestion.Color := FComponentsColor;
FDateQuestion.Color := FComponentsColor;
FSpecificationQuestion.Color := FComponentsColor;
end;
procedure TQuestionPanel.SetCharCase(Value: TEditCharCase);
begin
if FCharCase <> Value then
begin
FCharCase := Value;
FSpecificationQuestion.CharCase := FCharCase;
end;
end;
procedure TQuestionPanel.SetDude(Value: Boolean);
begin
FDude := Value;
if((FComboBoxQuestion.Items.Count = 3) and (FDude = False)) then
FComboBoxQuestion.Items.Delete(2)
else
if((FComboBoxQuestion.Items.Count = 2) and (FDude = True)) then
FComboBoxQuestion.Items.Add('?');
end;
procedure TQuestionPanel.SetupInternalComponents;
begin
FComboBoxQuestion := TComboBox.Create(Self);
FComboBoxQuestion.Parent := Self;
FDateCheckQuestion := TCheckBox.Create(Self);
FDateCheckQuestion.Parent := Self;
FDateQuestion := TDateTimePicker.Create(Self);
FDateQuestion.Parent := Self;
FSpecificationQuestion := TEdit.Create(Self);
FSpecificationQuestion.Parent := Self;
FComboBoxQuestion.Width := 40;
FDateCheckQuestion.Width := 10;
FDateQuestion.Width := 90;
FDateCheckQuestion.Top := 7;
FDateCheckQuestion.Left := FComboBoxQuestion.Left + FComboBoxQuestion.Width + 5;
FDateQuestion.Left := FDateCheckQuestion.Left + FDateCheckQuestion.Width + 2;
FSpecificationQuestion.Left := FDateQuestion.Left + FDateQuestion.Width + 5;
FSpecificationQuestion.Width := Width - 152;
FSpecificationQuestion.CharCase := ecUpperCase;
FComboBoxQuestion.ParentFont := False;
FDateQuestion.ParentFont := False;
FSpecificationQuestion.ParentFont := False;
FDude := False;
end;
procedure TQuestionPanel.CreateWnd;
begin
inherited;
FComboBoxQuestion.Items.Add('SI');
FComboBoxQuestion.Items.Add('NO');
if(FDude = True) then
FComboBoxQuestion.Items.Add('?');
FComboBoxQuestion.OnChange := ComboBoxQuestionChange;
FComboBoxQuestion.OnSelect := ComboBoxQuestionChange;
FComboBoxQuestion.OnKeyDown := ComboBoxQuestionKeyDown;
FComboBoxQuestion.OnKeyPress := ComboBoxQuestionKeyPress;
FDateCheckQuestion.OnClick := DateCheckQuestionClick;
EnabledDateAndSpecification;
end;
procedure TQuestionPanel.SetEnabled(Value: Boolean);
begin
inherited SetEnabled(Value);
FComboBoxQuestion.Enabled := Enabled;
FDateCheckQuestion.Enabled := Enabled;
FDateQuestion.Enabled := Enabled;
FSpecificationQuestion.Enabled := Enabled;
end;
constructor TQuestionPanel.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Height := 21;
Width := 300;
Caption := '';
BevelOuter := bvNone;
FCharCase := ecUpperCase;
FComponentsColor := clWindow;
SetupInternalComponents;
end;
Valora esta pregunta
0