Browse - OnDblclick or InPlaceEdit

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

Post Reply
mruizcanete
Posts: 16
Joined: Sat Apr 19, 2014 10:17 am

Browse - OnDblclick or InPlaceEdit

Post by mruizcanete »

Sorry if this topic has been answered yet, but after some days looking in the forum I haven't found the solution wich fits my needs.

I want to use browse to 'browse' only two fields of a dbf (which has 10 fields), making the first one uneditable and the second one editable inplace. The user only should navigate downwards using ENTER key and only in this second field.

I've tried using EDIT INPLACE, which changes the field content, but the pointer remains in the same row.
I've tired OnDblClick, which changes the pointer to the next record, but if I want to change the field content I have to provide a separated control (textbox) to do it so. But this is not my intention.

I only want to use BROWSE, pressing ENTER to start editing in place the content of that field for the first record, and pressing ENTER again, leaving the field and moving to the next record and with that field just in editing inplace mode for this second record. And so on until the last record. With no other controls available for users.

Is there any possibility of merging these two functionalities? I am a complete novel programmer and I am missing good practices and easy practices, as you can see...

Thanks so much... and greetings from the sunny Spain!!
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Browse - OnDblclick or InPlaceEdit

Post by Javier Tovar »

Hola mruizcanete,

Intente hacer algo que te pudiera ayudar pero sin éxito, si me cambio de registro pero me copia en el nuevo registro lo que tengo en el anterior. Quise hacer lo siguiente: al dar ENTER se posicionara al siguiente registro y diera de nuevo un ENTER por programación, para que entrara en automático a edición.

Code: Select all

#Include "Inkey.ch"

ON KEY RETURN VeSiguiente()


...

Procedure VeSiguiente()
*        NO SALIO LO QUE ESPERABA.
RETURN NIL

Esperemos a ver que dicen los compañeros,

Saludos desde México y Bienvenido!
mruizcanete
Posts: 16
Joined: Sat Apr 19, 2014 10:17 am

Re: Browse - OnDblclick or InPlaceEdit

Post by mruizcanete »

Hola Javier.

Gracias por tu respuesta. Pero sigo sin conseguir lo que pretendo. He intentado seguir tu sugerencia pero no me funciona, poque sigue quedándose en el registro en el que estaba. Tal y como te dije, usando On Dblclcik consigo ir al siguiente registro, pero no puedo editar 'inplace'; si uso 'edit in place' cambio los valores pero sigo estando en el mismo registro y no me cambia de fila.

¿Alguien tiene otra sugerencia?


Hello Javier.
Thanks for your answer. But I can't find what I need. I've tried to follow your suggestion but I doesnt't work 'cause it remains in the same record. As I said before, using On Dblclcik I can move to the next record, but I can't edit the value 'in place'; if I use 'edit in place' the values are changed but I can't move to the next row, remaining in the same record.

Any more suggestions?
Post Reply