In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Using ESC key
-
- Mensajes: 281
- Registrado: Vie Ago 04, 2006 4:58 pm
Using ESC key
Hi,
I've a MdiChild form which I would like to be able to close using the ESC
key. So I added the following code
METHOD FormKeyUp( oSender, nKey, nFlags ) CLASS TSerDoc
IF ( nKey == VK_ESCAPE )
::Close()
ENDIF
RETURN Nil
From this MdiChild I open a Modal Dialog to perform data editing.
If I press the ESC key on that form the key is also sent to the MdiChild
form causing it to close.
What am I doing wrong ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
I've a MdiChild form which I would like to be able to close using the ESC
key. So I added the following code
METHOD FormKeyUp( oSender, nKey, nFlags ) CLASS TSerDoc
IF ( nKey == VK_ESCAPE )
::Close()
ENDIF
RETURN Nil
From this MdiChild I open a Modal Dialog to perform data editing.
If I press the ESC key on that form the key is also sent to the MdiChild
form causing it to close.
What am I doing wrong ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
- ignacio
- Site Admin
- Mensajes: 9441
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Using ESC key
Giusepe,
The TFORM class uses the WM_KEYDOWN message to check for the press of
VK_ESCAPE on dialog forms. When this is the case, the the form is closed and
it RETURNS 0, so the message is not send to its parent form. But your code
controls WM_KEYUP message and then this is what it happens:
1) You push the ESC key, WM_KEYDOWN is triggered on Dialog form, the form
is closed and the message is not passed to its parent form
2) WM_KEYUP is triggered on Dialog form, since it is not processed, is
passed to its parent form.
3) The parent form processes the WM_KEYUP event and closes itself.
Solutions:
1) Use the event KEYDOWN instead of KEYUP
2) Catch the KEYUP event on the dialog form simply returning 0 when the key
is ESCAPE
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:1hkvfr3i43b6f.xjb6igyc19l$[email=.dlg@40tude.net...].dlg@40tude.net...[/email]
> Hi,
>
> I've a MdiChild form which I would like to be able to close using the ESC
> key. So I added the following code
>
> METHOD FormKeyUp( oSender, nKey, nFlags ) CLASS TSerDoc
> IF ( nKey == VK_ESCAPE )
> ::Close()
> ENDIF
> RETURN Nil
>
> From this MdiChild I open a Modal Dialog to perform data editing.
>
> If I press the ESC key on that form the key is also sent to the MdiChild
> form causing it to close.
>
> What am I doing wrong ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
The TFORM class uses the WM_KEYDOWN message to check for the press of
VK_ESCAPE on dialog forms. When this is the case, the the form is closed and
it RETURNS 0, so the message is not send to its parent form. But your code
controls WM_KEYUP message and then this is what it happens:
1) You push the ESC key, WM_KEYDOWN is triggered on Dialog form, the form
is closed and the message is not passed to its parent form
2) WM_KEYUP is triggered on Dialog form, since it is not processed, is
passed to its parent form.
3) The parent form processes the WM_KEYUP event and closes itself.
Solutions:
1) Use the event KEYDOWN instead of KEYUP
2) Catch the KEYUP event on the dialog form simply returning 0 when the key
is ESCAPE
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:1hkvfr3i43b6f.xjb6igyc19l$[email=.dlg@40tude.net...].dlg@40tude.net...[/email]
> Hi,
>
> I've a MdiChild form which I would like to be able to close using the ESC
> key. So I added the following code
>
> METHOD FormKeyUp( oSender, nKey, nFlags ) CLASS TSerDoc
> IF ( nKey == VK_ESCAPE )
> ::Close()
> ENDIF
> RETURN Nil
>
> From this MdiChild I open a Modal Dialog to perform data editing.
>
> If I press the ESC key on that form the key is also sent to the MdiChild
> form causing it to close.
>
> What am I doing wrong ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Using ESC key
Giusepe,
The TFORM class uses the WM_KEYDOWN message to check for the press of
VK_ESCAPE on dialog forms. When this is the case, the the form is closed and
it RETURNS 0, so the message is not send to its parent form. But your code
controls WM_KEYUP message and then this is what it happens:
1) You push the ESC key, WM_KEYDOWN is triggered on Dialog form, the form
is closed and the message is not passed to its parent form
2) WM_KEYUP is triggered on Dialog form, since it is not processed, is
passed to its parent form.
3) The parent form processes the WM_KEYUP event and closes itself.
Solutions:
1) Use the event KEYDOWN instead of KEYUP
2) Catch the KEYUP event on the dialog form simply returning 0 when the key
is ESCAPE
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:1hkvfr3i43b6f.xjb6igyc19l$[email=.dlg@40tude.net...].dlg@40tude.net...[/email]
> Hi,
>
> I've a MdiChild form which I would like to be able to close using the ESC
> key. So I added the following code
>
> METHOD FormKeyUp( oSender, nKey, nFlags ) CLASS TSerDoc
> IF ( nKey == VK_ESCAPE )
> ::Close()
> ENDIF
> RETURN Nil
>
> From this MdiChild I open a Modal Dialog to perform data editing.
>
> If I press the ESC key on that form the key is also sent to the MdiChild
> form causing it to close.
>
> What am I doing wrong ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
The TFORM class uses the WM_KEYDOWN message to check for the press of
VK_ESCAPE on dialog forms. When this is the case, the the form is closed and
it RETURNS 0, so the message is not send to its parent form. But your code
controls WM_KEYUP message and then this is what it happens:
1) You push the ESC key, WM_KEYDOWN is triggered on Dialog form, the form
is closed and the message is not passed to its parent form
2) WM_KEYUP is triggered on Dialog form, since it is not processed, is
passed to its parent form.
3) The parent form processes the WM_KEYUP event and closes itself.
Solutions:
1) Use the event KEYDOWN instead of KEYUP
2) Catch the KEYUP event on the dialog form simply returning 0 when the key
is ESCAPE
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:1hkvfr3i43b6f.xjb6igyc19l$[email=.dlg@40tude.net...].dlg@40tude.net...[/email]
> Hi,
>
> I've a MdiChild form which I would like to be able to close using the ESC
> key. So I added the following code
>
> METHOD FormKeyUp( oSender, nKey, nFlags ) CLASS TSerDoc
> IF ( nKey == VK_ESCAPE )
> ::Close()
> ENDIF
> RETURN Nil
>
> From this MdiChild I open a Modal Dialog to perform data editing.
>
> If I press the ESC key on that form the key is also sent to the MdiChild
> form causing it to close.
>
> What am I doing wrong ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
-
- Mensajes: 281
- Registrado: Vie Ago 04, 2006 4:58 pm
Using ESC key
Il Thu, 6 Jul 2006 16:20:21 +0200, Ignacio Ortiz de Zúñiga ha scritto:
Ignacio,
thanks for the fast response.
I've stumbled into another problem.
I've a form as per the attached image. In this form I show the contents of
four different tables all sharing a common field "DESCRI". The column of
the browser is defined within the IDE.
Clicking on the TTabCtrl over the browser select the table you can work
with.
I first tried rebuilding the TDataset after every selection and:
- the first time I assign the dataset to the browser everything is OK
- the second time and so on, the browser column are updated to reflect all
the columns from the table.
So what can I do to change programmatically the dataset of a browser
retaining the current column configuration ?
Or do I have to rebuild the browser column every time I change the dataset
?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
--
Ignacio,
thanks for the fast response.
I've stumbled into another problem.
I've a form as per the attached image. In this form I show the contents of
four different tables all sharing a common field "DESCRI". The column of
the browser is defined within the IDE.
Clicking on the TTabCtrl over the browser select the table you can work
with.
I first tried rebuilding the TDataset after every selection and:
- the first time I assign the dataset to the browser everything is OK
- the second time and so on, the browser column are updated to reflect all
the columns from the table.
So what can I do to change programmatically the dataset of a browser
retaining the current column configuration ?
Or do I have to rebuild the browser column every time I change the dataset
?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
--
-
- Mensajes: 281
- Registrado: Vie Ago 04, 2006 4:58 pm
Using ESC key
Il Thu, 6 Jul 2006 16:20:21 +0200, Ignacio Ortiz de Zúñiga ha scritto:
Ignacio,
thanks for the fast response.
I've stumbled into another problem.
I've a form as per the attached image. In this form I show the contents of
four different tables all sharing a common field "DESCRI". The column of
the browser is defined within the IDE.
Clicking on the TTabCtrl over the browser select the table you can work
with.
I first tried rebuilding the TDataset after every selection and:
- the first time I assign the dataset to the browser everything is OK
- the second time and so on, the browser column are updated to reflect all
the columns from the table.
So what can I do to change programmatically the dataset of a browser
retaining the current column configuration ?
Or do I have to rebuild the browser column every time I change the dataset
?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
--
Ignacio,
thanks for the fast response.
I've stumbled into another problem.
I've a form as per the attached image. In this form I show the contents of
four different tables all sharing a common field "DESCRI". The column of
the browser is defined within the IDE.
Clicking on the TTabCtrl over the browser select the table you can work
with.
I first tried rebuilding the TDataset after every selection and:
- the first time I assign the dataset to the browser everything is OK
- the second time and so on, the browser column are updated to reflect all
the columns from the table.
So what can I do to change programmatically the dataset of a browser
retaining the current column configuration ?
Or do I have to rebuild the browser column every time I change the dataset
?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
--
- ignacio
- Site Admin
- Mensajes: 9441
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Using ESC key
Giussepe,
On the OnChange event of the TTabCtrl, just reassign the Dataset:
oBrowse:oDataSet := oDataSet1
oBrowse:oDataSet := oDataSet2
oBrowse:oDataSet := oDataSet3
oBrowse:oDataSet := oDataSet4
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:[email=eep9uhtut4dm.9n0mlpjjiuyb.dlg@40tude.net...]eep9uhtut4dm.9n0mlpjjiuyb.dlg@40tude.net...[/email]
> Il Thu, 6 Jul 2006 16:20:21 +0200, Ignacio Ortiz de Zúñiga ha scritto:
>
> Ignacio,
> thanks for the fast response.
>
> I've stumbled into another problem.
>
> I've a form as per the attached image. In this form I show the contents of
> four different tables all sharing a common field "DESCRI". The column of
> the browser is defined within the IDE.
>
> Clicking on the TTabCtrl over the browser select the table you can work
> with.
>
> I first tried rebuilding the TDataset after every selection and:
> - the first time I assign the dataset to the browser everything is OK
> - the second time and so on, the browser column are updated to reflect all
> the columns from the table.
>
> So what can I do to change programmatically the dataset of a browser
> retaining the current column configuration ?
>
> Or do I have to rebuild the browser column every time I change the dataset
> ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
On the OnChange event of the TTabCtrl, just reassign the Dataset:
oBrowse:oDataSet := oDataSet1
oBrowse:oDataSet := oDataSet2
oBrowse:oDataSet := oDataSet3
oBrowse:oDataSet := oDataSet4
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:[email=eep9uhtut4dm.9n0mlpjjiuyb.dlg@40tude.net...]eep9uhtut4dm.9n0mlpjjiuyb.dlg@40tude.net...[/email]
> Il Thu, 6 Jul 2006 16:20:21 +0200, Ignacio Ortiz de Zúñiga ha scritto:
>
> Ignacio,
> thanks for the fast response.
>
> I've stumbled into another problem.
>
> I've a form as per the attached image. In this form I show the contents of
> four different tables all sharing a common field "DESCRI". The column of
> the browser is defined within the IDE.
>
> Clicking on the TTabCtrl over the browser select the table you can work
> with.
>
> I first tried rebuilding the TDataset after every selection and:
> - the first time I assign the dataset to the browser everything is OK
> - the second time and so on, the browser column are updated to reflect all
> the columns from the table.
>
> So what can I do to change programmatically the dataset of a browser
> retaining the current column configuration ?
>
> Or do I have to rebuild the browser column every time I change the dataset
> ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Using ESC key
Giussepe,
On the OnChange event of the TTabCtrl, just reassign the Dataset:
oBrowse:oDataSet := oDataSet1
oBrowse:oDataSet := oDataSet2
oBrowse:oDataSet := oDataSet3
oBrowse:oDataSet := oDataSet4
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:[email=eep9uhtut4dm.9n0mlpjjiuyb.dlg@40tude.net...]eep9uhtut4dm.9n0mlpjjiuyb.dlg@40tude.net...[/email]
> Il Thu, 6 Jul 2006 16:20:21 +0200, Ignacio Ortiz de Zúñiga ha scritto:
>
> Ignacio,
> thanks for the fast response.
>
> I've stumbled into another problem.
>
> I've a form as per the attached image. In this form I show the contents of
> four different tables all sharing a common field "DESCRI". The column of
> the browser is defined within the IDE.
>
> Clicking on the TTabCtrl over the browser select the table you can work
> with.
>
> I first tried rebuilding the TDataset after every selection and:
> - the first time I assign the dataset to the browser everything is OK
> - the second time and so on, the browser column are updated to reflect all
> the columns from the table.
>
> So what can I do to change programmatically the dataset of a browser
> retaining the current column configuration ?
>
> Or do I have to rebuild the browser column every time I change the dataset
> ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
On the OnChange event of the TTabCtrl, just reassign the Dataset:
oBrowse:oDataSet := oDataSet1
oBrowse:oDataSet := oDataSet2
oBrowse:oDataSet := oDataSet3
oBrowse:oDataSet := oDataSet4
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:[email=eep9uhtut4dm.9n0mlpjjiuyb.dlg@40tude.net...]eep9uhtut4dm.9n0mlpjjiuyb.dlg@40tude.net...[/email]
> Il Thu, 6 Jul 2006 16:20:21 +0200, Ignacio Ortiz de Zúñiga ha scritto:
>
> Ignacio,
> thanks for the fast response.
>
> I've stumbled into another problem.
>
> I've a form as per the attached image. In this form I show the contents of
> four different tables all sharing a common field "DESCRI". The column of
> the browser is defined within the IDE.
>
> Clicking on the TTabCtrl over the browser select the table you can work
> with.
>
> I first tried rebuilding the TDataset after every selection and:
> - the first time I assign the dataset to the browser everything is OK
> - the second time and so on, the browser column are updated to reflect all
> the columns from the table.
>
> So what can I do to change programmatically the dataset of a browser
> retaining the current column configuration ?
>
> Or do I have to rebuild the browser column every time I change the dataset
> ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
-
- Mensajes: 281
- Registrado: Vie Ago 04, 2006 4:58 pm
Using ESC key
Il Fri, 7 Jul 2006 10:08:31 +0200, Ignacio Ortiz de Zúñiga ha scritto:
Ignacio,
> On the OnChange event of the TTabCtrl, just reassign the Dataset:
>
> oBrowse:oDataSet := oDataSet1
> oBrowse:oDataSet := oDataSet2
> oBrowse:oDataSet := oDataSet3
> oBrowse:oDataSet := oDataSet4
>
This was my first choice but assigning the dataset also caused the browser
to reconfigure the columns as you can see in the attached picture.
Am I missing something ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
--
Ignacio,
> On the OnChange event of the TTabCtrl, just reassign the Dataset:
>
> oBrowse:oDataSet := oDataSet1
> oBrowse:oDataSet := oDataSet2
> oBrowse:oDataSet := oDataSet3
> oBrowse:oDataSet := oDataSet4
>
This was my first choice but assigning the dataset also caused the browser
to reconfigure the columns as you can see in the attached picture.
Am I missing something ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
--
-
- Mensajes: 281
- Registrado: Vie Ago 04, 2006 4:58 pm
Using ESC key
Il Fri, 7 Jul 2006 10:08:31 +0200, Ignacio Ortiz de Zúñiga ha scritto:
Ignacio,
> On the OnChange event of the TTabCtrl, just reassign the Dataset:
>
> oBrowse:oDataSet := oDataSet1
> oBrowse:oDataSet := oDataSet2
> oBrowse:oDataSet := oDataSet3
> oBrowse:oDataSet := oDataSet4
>
This was my first choice but assigning the dataset also caused the browser
to reconfigure the columns as you can see in the attached picture.
Am I missing something ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
--
Ignacio,
> On the OnChange event of the TTabCtrl, just reassign the Dataset:
>
> oBrowse:oDataSet := oDataSet1
> oBrowse:oDataSet := oDataSet2
> oBrowse:oDataSet := oDataSet3
> oBrowse:oDataSet := oDataSet4
>
This was my first choice but assigning the dataset also caused the browser
to reconfigure the columns as you can see in the attached picture.
Am I missing something ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
--
- ignacio
- Site Admin
- Mensajes: 9441
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Using ESC key
Giusseppe,
You are right, a few months ago a user told us to completely reset the
browse when a different DataSet was assigned because in most situations a
run-time error is produced.
Just do this:
oBrowse:Reset()
oBrowse:AddCol( oCol )
oBrowse:oDataSet := oDataSet1
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:1ptzyu1neknu9$[email=.1u845cq8xsrdf.dlg@40tude.net...].1u845cq8xsrdf.dlg@40tude.net...[/email]
> Il Fri, 7 Jul 2006 10:08:31 +0200, Ignacio Ortiz de Zúñiga ha scritto:
>
> Ignacio,
>
>> On the OnChange event of the TTabCtrl, just reassign the Dataset:
>>
>> oBrowse:oDataSet := oDataSet1
>> oBrowse:oDataSet := oDataSet2
>> oBrowse:oDataSet := oDataSet3
>> oBrowse:oDataSet := oDataSet4
>>
> This was my first choice but assigning the dataset also caused the browser
> to reconfigure the columns as you can see in the attached picture.
>
> Am I missing something ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
You are right, a few months ago a user told us to completely reset the
browse when a different DataSet was assigned because in most situations a
run-time error is produced.
Just do this:
oBrowse:Reset()
oBrowse:AddCol( oCol )
oBrowse:oDataSet := oDataSet1
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:1ptzyu1neknu9$[email=.1u845cq8xsrdf.dlg@40tude.net...].1u845cq8xsrdf.dlg@40tude.net...[/email]
> Il Fri, 7 Jul 2006 10:08:31 +0200, Ignacio Ortiz de Zúñiga ha scritto:
>
> Ignacio,
>
>> On the OnChange event of the TTabCtrl, just reassign the Dataset:
>>
>> oBrowse:oDataSet := oDataSet1
>> oBrowse:oDataSet := oDataSet2
>> oBrowse:oDataSet := oDataSet3
>> oBrowse:oDataSet := oDataSet4
>>
> This was my first choice but assigning the dataset also caused the browser
> to reconfigure the columns as you can see in the attached picture.
>
> Am I missing something ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Using ESC key
Giusseppe,
You are right, a few months ago a user told us to completely reset the
browse when a different DataSet was assigned because in most situations a
run-time error is produced.
Just do this:
oBrowse:Reset()
oBrowse:AddCol( oCol )
oBrowse:oDataSet := oDataSet1
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:1ptzyu1neknu9$[email=.1u845cq8xsrdf.dlg@40tude.net...].1u845cq8xsrdf.dlg@40tude.net...[/email]
> Il Fri, 7 Jul 2006 10:08:31 +0200, Ignacio Ortiz de Zúñiga ha scritto:
>
> Ignacio,
>
>> On the OnChange event of the TTabCtrl, just reassign the Dataset:
>>
>> oBrowse:oDataSet := oDataSet1
>> oBrowse:oDataSet := oDataSet2
>> oBrowse:oDataSet := oDataSet3
>> oBrowse:oDataSet := oDataSet4
>>
> This was my first choice but assigning the dataset also caused the browser
> to reconfigure the columns as you can see in the attached picture.
>
> Am I missing something ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
You are right, a few months ago a user told us to completely reset the
browse when a different DataSet was assigned because in most situations a
run-time error is produced.
Just do this:
oBrowse:Reset()
oBrowse:AddCol( oCol )
oBrowse:oDataSet := oDataSet1
Regards,
"Giuseppe Bogetti" <orangeREMOVEMEsocks@bgsoft.it> escribió en el mensaje
news:1ptzyu1neknu9$[email=.1u845cq8xsrdf.dlg@40tude.net...].1u845cq8xsrdf.dlg@40tude.net...[/email]
> Il Fri, 7 Jul 2006 10:08:31 +0200, Ignacio Ortiz de Zúñiga ha scritto:
>
> Ignacio,
>
>> On the OnChange event of the TTabCtrl, just reassign the Dataset:
>>
>> oBrowse:oDataSet := oDataSet1
>> oBrowse:oDataSet := oDataSet2
>> oBrowse:oDataSet := oDataSet3
>> oBrowse:oDataSet := oDataSet4
>>
> This was my first choice but assigning the dataset also caused the browser
> to reconfigure the columns as you can see in the attached picture.
>
> Am I missing something ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy