![]() |
| |||||||
| Registrarse | Preguntas Frecuentes | Lista de Foreros | Calendario | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
![]() |
| | LinkBack | Herramientas | Desplegado |
| |||
| Saludos a todos y Feliz Año Nuevo Estoy intentando la creación de controles en runtime y soy incapaz de hacerlo. Pruebo con este ejemplo que está extraído de la Ayuda de Delphi: procedure TForm1.FormCreate(Sender: TObject); const TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', 'Items', 'Parts' ); var i: Integer; PageControl1: TPageControl; begin PageControl1 := TPageControl.Create(Self); PageControl1.Parent := Self; PageControl1.Align := alClient; for i := Low(TabTitles) to High(TabTitles) do with TTabSheet.Create(PageControl1) do begin PageControl := PageControl1; Name := 'ts' + TabTitles[i]; Caption := TabTitles[i]; end; end; Hasta aquí todo bien, el problema viene cuando quiero crear un TEdit y un TListBox, en cada una de las pestañas creadas, soy incapaz. Muchas gracias anticipadas. |
| | ||||
| ||||
| |
| |||
| cuando creas el tedit o el tlistbox tienes que hacer: edit := TEdit.Create(PageControl1); edit.Parent := PageControl1; edit.top := 1; edit.left := 1; y lo mismo con el tlistbox Saludos, Dani "gato" <estonoesloque***parece.es> escribió en el mensaje news:Xns973A91662EE2Aningunoningunoes***213.0.184.81 ... > Saludos a todos y Feliz Año Nuevo > > Estoy intentando la creación de controles en runtime y soy incapaz de > hacerlo. > > Pruebo con este ejemplo que está extraído de la Ayuda de Delphi: > > procedure TForm1.FormCreate(Sender: TObject); > > const > TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', 'Items', > 'Parts' ); > var > i: Integer; > PageControl1: TPageControl; > begin > PageControl1 := TPageControl.Create(Self); > PageControl1.Parent := Self; > PageControl1.Align := alClient; > for i := Low(TabTitles) to High(TabTitles) do > with TTabSheet.Create(PageControl1) do > begin > PageControl := PageControl1; > Name := 'ts' + TabTitles[i]; > Caption := TabTitles[i]; > end; > end; > > Hasta aquí todo bien, el problema viene cuando quiero crear un TEdit y un > TListBox, en cada una de las pestañas creadas, soy incapaz. > Muchas gracias anticipadas. |
| |||
| cuando creas el tedit o el tlistbox tienes que hacer: edit := TEdit.Create(PageControl1); edit.Parent := PageControl1; edit.top := 1; edit.left := 1; y lo mismo con el tlistbox Saludos, Dani "gato" <estonoesloque***parece.es> escribió en el mensaje news:Xns973A91662EE2Aningunoningunoes***213.0.184.81 ... > Saludos a todos y Feliz Año Nuevo > > Estoy intentando la creación de controles en runtime y soy incapaz de > hacerlo. > > Pruebo con este ejemplo que está extraído de la Ayuda de Delphi: > > procedure TForm1.FormCreate(Sender: TObject); > > const > TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', 'Items', > 'Parts' ); > var > i: Integer; > PageControl1: TPageControl; > begin > PageControl1 := TPageControl.Create(Self); > PageControl1.Parent := Self; > PageControl1.Align := alClient; > for i := Low(TabTitles) to High(TabTitles) do > with TTabSheet.Create(PageControl1) do > begin > PageControl := PageControl1; > Name := 'ts' + TabTitles[i]; > Caption := TabTitles[i]; > end; > end; > > Hasta aquí todo bien, el problema viene cuando quiero crear un TEdit y un > TListBox, en cada una de las pestañas creadas, soy incapaz. > Muchas gracias anticipadas. |
| |||
| cuando creas el tedit o el tlistbox tienes que hacer: edit := TEdit.Create(PageControl1); edit.Parent := PageControl1; edit.top := 1; edit.left := 1; y lo mismo con el tlistbox Saludos, Dani "gato" <estonoesloque***parece.es> escribió en el mensaje news:Xns973A91662EE2Aningunoningunoes***213.0.184.81 ... > Saludos a todos y Feliz Año Nuevo > > Estoy intentando la creación de controles en runtime y soy incapaz de > hacerlo. > > Pruebo con este ejemplo que está extraído de la Ayuda de Delphi: > > procedure TForm1.FormCreate(Sender: TObject); > > const > TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', 'Items', > 'Parts' ); > var > i: Integer; > PageControl1: TPageControl; > begin > PageControl1 := TPageControl.Create(Self); > PageControl1.Parent := Self; > PageControl1.Align := alClient; > for i := Low(TabTitles) to High(TabTitles) do > with TTabSheet.Create(PageControl1) do > begin > PageControl := PageControl1; > Name := 'ts' + TabTitles[i]; > Caption := TabTitles[i]; > end; > end; > > Hasta aquí todo bien, el problema viene cuando quiero crear un TEdit y un > TListBox, en cada una de las pestañas creadas, soy incapaz. > Muchas gracias anticipadas. |
| |||
| cuando creas el tedit o el tlistbox tienes que hacer: edit := TEdit.Create(PageControl1); edit.Parent := PageControl1; edit.top := 1; edit.left := 1; y lo mismo con el tlistbox Saludos, Dani "gato" <estonoesloque***parece.es> escribió en el mensaje news:Xns973A91662EE2Aningunoningunoes***213.0.184.81 ... > Saludos a todos y Feliz Año Nuevo > > Estoy intentando la creación de controles en runtime y soy incapaz de > hacerlo. > > Pruebo con este ejemplo que está extraído de la Ayuda de Delphi: > > procedure TForm1.FormCreate(Sender: TObject); > > const > TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', 'Items', > 'Parts' ); > var > i: Integer; > PageControl1: TPageControl; > begin > PageControl1 := TPageControl.Create(Self); > PageControl1.Parent := Self; > PageControl1.Align := alClient; > for i := Low(TabTitles) to High(TabTitles) do > with TTabSheet.Create(PageControl1) do > begin > PageControl := PageControl1; > Name := 'ts' + TabTitles[i]; > Caption := TabTitles[i]; > end; > end; > > Hasta aquí todo bien, el problema viene cuando quiero crear un TEdit y un > TListBox, en cada una de las pestañas creadas, soy incapaz. > Muchas gracias anticipadas. |
| |||
| cuando creas el tedit o el tlistbox tienes que hacer: edit := TEdit.Create(PageControl1); edit.Parent := PageControl1; edit.top := 1; edit.left := 1; y lo mismo con el tlistbox Saludos, Dani "gato" <estonoesloque***parece.es> escribió en el mensaje news:Xns973A91662EE2Aningunoningunoes***213.0.184.81 ... > Saludos a todos y Feliz Año Nuevo > > Estoy intentando la creación de controles en runtime y soy incapaz de > hacerlo. > > Pruebo con este ejemplo que está extraído de la Ayuda de Delphi: > > procedure TForm1.FormCreate(Sender: TObject); > > const > TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', 'Items', > 'Parts' ); > var > i: Integer; > PageControl1: TPageControl; > begin > PageControl1 := TPageControl.Create(Self); > PageControl1.Parent := Self; > PageControl1.Align := alClient; > for i := Low(TabTitles) to High(TabTitles) do > with TTabSheet.Create(PageControl1) do > begin > PageControl := PageControl1; > Name := 'ts' + TabTitles[i]; > Caption := TabTitles[i]; > end; > end; > > Hasta aquí todo bien, el problema viene cuando quiero crear un TEdit y un > TListBox, en cada una de las pestañas creadas, soy incapaz. > Muchas gracias anticipadas. |
| |||
| cuando creas el tedit o el tlistbox tienes que hacer: edit := TEdit.Create(PageControl1); edit.Parent := PageControl1; edit.top := 1; edit.left := 1; y lo mismo con el tlistbox Saludos, Dani "gato" <estonoesloque***parece.es> escribió en el mensaje news:Xns973A91662EE2Aningunoningunoes***213.0.184.81 ... > Saludos a todos y Feliz Año Nuevo > > Estoy intentando la creación de controles en runtime y soy incapaz de > hacerlo. > > Pruebo con este ejemplo que está extraído de la Ayuda de Delphi: > > procedure TForm1.FormCreate(Sender: TObject); > > const > TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', 'Items', > 'Parts' ); > var > i: Integer; > PageControl1: TPageControl; > begin > PageControl1 := TPageControl.Create(Self); > PageControl1.Parent := Self; > PageControl1.Align := alClient; > for i := Low(TabTitles) to High(TabTitles) do > with TTabSheet.Create(PageControl1) do > begin > PageControl := PageControl1; > Name := 'ts' + TabTitles[i]; > Caption := TabTitles[i]; > end; > end; > > Hasta aquí todo bien, el problema viene cuando quiero crear un TEdit y un > TListBox, en cada una de las pestañas creadas, soy incapaz. > Muchas gracias anticipadas. |
| |||
| cuando creas el tedit o el tlistbox tienes que hacer: edit := TEdit.Create(PageControl1); edit.Parent := PageControl1; edit.top := 1; edit.left := 1; y lo mismo con el tlistbox Saludos, Dani "gato" <estonoesloque***parece.es> escribió en el mensaje news:Xns973A91662EE2Aningunoningunoes***213.0.184.81 ... > Saludos a todos y Feliz Año Nuevo > > Estoy intentando la creación de controles en runtime y soy incapaz de > hacerlo. > > Pruebo con este ejemplo que está extraído de la Ayuda de Delphi: > > procedure TForm1.FormCreate(Sender: TObject); > > const > TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', 'Items', > 'Parts' ); > var > i: Integer; > PageControl1: TPageControl; > begin > PageControl1 := TPageControl.Create(Self); > PageControl1.Parent := Self; > PageControl1.Align := alClient; > for i := Low(TabTitles) to High(TabTitles) do > with TTabSheet.Create(PageControl1) do > begin > PageControl := PageControl1; > Name := 'ts' + TabTitles[i]; > Caption := TabTitles[i]; > end; > end; > > Hasta aquí todo bien, el problema viene cuando quiero crear un TEdit y un > TListBox, en cada una de las pestañas creadas, soy incapaz. > Muchas gracias anticipadas. |
| |||
| "Tonic" <tonic78PUTOSPAM***gmailQUITAESTO.com> wrote in news:41fig2F1du1arU1***individual.net: > cuando creas el tedit o el tlistbox tienes que hacer: > > edit := TEdit.Create(PageControl1); > edit.Parent := PageControl1; > edit.top := 1; > edit.left := 1; así lo hago, pero todos los TEdit se crean sólo en la primera página y además cuando cambio a otra y vuelvo a la primera, los controles han desaparecido ¿?. Curioso ¿no? > > y lo mismo con el tlistbox > > Saludos, > Dani > > "gato" <estonoesloque***parece.es> escribió en el mensaje > news:Xns973A91662EE2Aningunoningunoes***213.0.184.81 ... >> Saludos a todos y Feliz Año Nuevo >> >> Estoy intentando la creación de controles en runtime y soy incapaz de >> hacerlo. >> >> Pruebo con este ejemplo que está extraído de la Ayuda de Delphi: >> >> procedure TForm1.FormCreate(Sender: TObject); >> >> const >> TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', >> 'Items', >> 'Parts' ); >> var >> i: Integer; >> PageControl1: TPageControl; >> begin >> PageControl1 := TPageControl.Create(Self); >> PageControl1.Parent := Self; >> PageControl1.Align := alClient; >> for i := Low(TabTitles) to High(TabTitles) do >> with TTabSheet.Create(PageControl1) do >> begin >> PageControl := PageControl1; >> Name := 'ts' + TabTitles[i]; >> Caption := TabTitles[i]; >> end; >> end; >> >> Hasta aquí todo bien, el problema viene cuando quiero crear un TEdit >> y un TListBox, en cada una de las pestañas creadas, soy incapaz. >> Muchas gracias anticipadas. > > |
| |
| |
| |||
| "Tonic" <tonic78PUTOSPAM***gmailQUITAESTO.com> wrote in news:41fig2F1du1arU1***individual.net: > cuando creas el tedit o el tlistbox tienes que hacer: > > edit := TEdit.Create(PageControl1); > edit.Parent := PageControl1; > edit.top := 1; > edit.left := 1; así lo hago, pero todos los TEdit se crean sólo en la primera página y además cuando cambio a otra y vuelvo a la primera, los controles han desaparecido ¿?. Curioso ¿no? > > y lo mismo con el tlistbox > > Saludos, > Dani > > "gato" <estonoesloque***parece.es> escribió en el mensaje > news:Xns973A91662EE2Aningunoningunoes***213.0.184.81 ... >> Saludos a todos y Feliz Año Nuevo >> >> Estoy intentando la creación de controles en runtime y soy incapaz de >> hacerlo. >> >> Pruebo con este ejemplo que está extraído de la Ayuda de Delphi: >> >> procedure TForm1.FormCreate(Sender: TObject); >> >> const >> TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', >> 'Items', >> 'Parts' ); >> var >> i: Integer; >> PageControl1: TPageControl; >> begin >> PageControl1 := TPageControl.Create(Self); >> PageControl1.Parent := Self; >> PageControl1.Align := alClient; >> for i := Low(TabTitles) to High(TabTitles) do >> with TTabSheet.Create(PageControl1) do >> begin >> PageControl := PageControl1; >> Name := 'ts' + TabTitles[i]; >> Caption := TabTitles[i]; >> end; >> end; >> >> Hasta aquí todo bien, el problema viene cuando quiero crear un TEdit >> y un TListBox, en cada una de las pestañas creadas, soy incapaz. >> Muchas gracias anticipadas. > > |
![]() |
| Herramientas | |
| Desplegado | |
| |
Temas Similares | ||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Problema con ADO y algunos controles en VFP 9 | Calvin | Newsgroup microsoft.public.es.vfoxpro | 1 | 24-06-2008 19:56:49 |
| Creación de Controles de Usuario | Javito | Newsgroup microsoft.public.es.csharp | 1 | 10-12-2007 10:13:16 |
| Creación de controles en tiempo de ejecución | marbarru@gmail.com | Newsgroup microsoft.public.es.vba | 39 | 27-12-2006 05:21:08 |
| Problema con controles en formulario | Francisco del Valle | Newsgroup microsoft.public.es.dotnet.framework | 0 | 29-05-2006 18:06:57 |
| Creacion de Controles | Javier Osuna | Newsgroup microsoft.public.es.desarrollo.aplicaciones.moviles | 12 | 20-05-2005 12:20:53 |