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.
Control with array List 'tick' boxes ....
-
- Mensajes: 384
- Registrado: Mar May 01, 2007 5:49 pm
Control with array List 'tick' boxes ....
Hi,
I want to create a list of say 'Clubs' or 'Interests' that a person has and
allow them to 'tick' the 'Cluds or 'Interests' they have. The List of
'Clubs' or 'Interests' are maintained in a .dbf.
I have loaded an array browse from the dbf with the necessary columns and an
extra column for the 'ticks' ... see image.
I have made column 3 editable ..... so I can type say an X in the column
where necessary.
My questions are ....
1. Is there a Xailer control that would do this for me more easily? Maybe
a Column edit type of 'CheckBox'?
2. If I do use an arraybrowse like here ...... I want to set the X just
with the Spacebar ... I can add code to the oGridEdit:onChar event and
detect nKey=32 but dont know how to return an X to the screen.
3. If I do use an arraybrowse like here ...... I want to minimise keypresses
and EXIT my get using the UP/DOWN keys but I think these are captured at the
browse level and I cannot find an event to capture them and force the
oGridEdit to exit.
Any suggestions would be appreciated.
Regards, Chris
Attached files
I want to create a list of say 'Clubs' or 'Interests' that a person has and
allow them to 'tick' the 'Cluds or 'Interests' they have. The List of
'Clubs' or 'Interests' are maintained in a .dbf.
I have loaded an array browse from the dbf with the necessary columns and an
extra column for the 'ticks' ... see image.
I have made column 3 editable ..... so I can type say an X in the column
where necessary.
My questions are ....
1. Is there a Xailer control that would do this for me more easily? Maybe
a Column edit type of 'CheckBox'?
2. If I do use an arraybrowse like here ...... I want to set the X just
with the Spacebar ... I can add code to the oGridEdit:onChar event and
detect nKey=32 but dont know how to return an X to the screen.
3. If I do use an arraybrowse like here ...... I want to minimise keypresses
and EXIT my get using the UP/DOWN keys but I think these are captured at the
browse level and I cannot find an event to capture them and force the
oGridEdit to exit.
Any suggestions would be appreciated.
Regards, Chris
Attached files
-
- Mensajes: 384
- Registrado: Mar May 01, 2007 5:49 pm
Control with array List 'tick' boxes ....
Hi,
I have solved my own Questio 2 ... Setting to X ... I need to set the
oGridEdit:Value to X ... simple.
Question 3, detecting UP/DOWN arrows and exiting the oGridEdit ... still
struggling on that.
Chris
"Chris Gillard" <chris@bluesquare.co.uk> wrote in message
news:4d777a45$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hi,
>
> I want to create a list of say 'Clubs' or 'Interests' that a person has
> and allow them to 'tick' the 'Cluds or 'Interests' they have. The List of
> 'Clubs' or 'Interests' are maintained in a .dbf.
>
> I have loaded an array browse from the dbf with the necessary columns and
> an extra column for the 'ticks' ... see image.
>
> I have made column 3 editable ..... so I can type say an X in the column
> where necessary.
>
> My questions are ....
>
> 1. Is there a Xailer control that would do this for me more easily?
> Maybe a Column edit type of 'CheckBox'?
>
> 2. If I do use an arraybrowse like here ...... I want to set the X just
> with the Spacebar ... I can add code to the oGridEdit:onChar event and
> detect nKey=32 but dont know how to return an X to the screen.
>
> 3. If I do use an arraybrowse like here ...... I want to minimise
> keypresses and EXIT my get using the UP/DOWN keys but I think these are
> captured at the browse level and I cannot find an event to capture them
> and force the oGridEdit to exit.
>
> Any suggestions would be appreciated.
>
> Regards, Chris
>
>
>
>
>
>
I have solved my own Questio 2 ... Setting to X ... I need to set the
oGridEdit:Value to X ... simple.
Question 3, detecting UP/DOWN arrows and exiting the oGridEdit ... still
struggling on that.
Chris
"Chris Gillard" <chris@bluesquare.co.uk> wrote in message
news:4d777a45$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hi,
>
> I want to create a list of say 'Clubs' or 'Interests' that a person has
> and allow them to 'tick' the 'Cluds or 'Interests' they have. The List of
> 'Clubs' or 'Interests' are maintained in a .dbf.
>
> I have loaded an array browse from the dbf with the necessary columns and
> an extra column for the 'ticks' ... see image.
>
> I have made column 3 editable ..... so I can type say an X in the column
> where necessary.
>
> My questions are ....
>
> 1. Is there a Xailer control that would do this for me more easily?
> Maybe a Column edit type of 'CheckBox'?
>
> 2. If I do use an arraybrowse like here ...... I want to set the X just
> with the Spacebar ... I can add code to the oGridEdit:onChar event and
> detect nKey=32 but dont know how to return an X to the screen.
>
> 3. If I do use an arraybrowse like here ...... I want to minimise
> keypresses and EXIT my get using the UP/DOWN keys but I think these are
> captured at the browse level and I cannot find an event to capture them
> and force the oGridEdit to exit.
>
> Any suggestions would be appreciated.
>
> Regards, Chris
>
>
>
>
>
>
- ignacio
- Site Admin
- Mensajes: 9447
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Control with array List 'tick' boxes ....
Hi,
1) In case is not a row edition (check the method IsMultipleEdit) I suggest
you use two images for checked & unchecked and change its value on the
TBrwColumn:OnEdit event and returning false. In case is a row edition I
suggest you use a listbox with the values 'Yes' & 'No'
2) It seems you already got this working
3) The keys are first processed by the TBrwColumn:oGridEdit and you can trap
them with oGridEdit:KeyDown() if you want. BTW the Key down and key up are
stopped on the control to avoid the propagation to its container browse.
You may overload TGridEdit to receive those events:
CLASS TGridEdit FROM XGridEdit
METHOD WMKeyDown( nKey, nFlags, hWnd )
END CLASS
METHOD WMKeyDown( nKey, nFlags, hWnd ) CLASS TGridEdit
IF nKey == VK_UP .OR. nKey == VK_DOWN
::OnKeyDown( nKey, nFlags )
ENDIF
RETURN Super:WMKeyDown( nKey, nFlags, hWnd )
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
http://www.xailer.com/forum
http://www.xailer.com/dokuwiki
"Chris Gillard" escribió en el mensaje de
noticias:4d777a45$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
Hi,
I want to create a list of say 'Clubs' or 'Interests' that a person has and
allow them to 'tick' the 'Cluds or 'Interests' they have. The List of
'Clubs' or 'Interests' are maintained in a .dbf.
I have loaded an array browse from the dbf with the necessary columns and an
extra column for the 'ticks' ... see image.
I have made column 3 editable ..... so I can type say an X in the column
where necessary.
My questions are ....
1. Is there a Xailer control that would do this for me more easily? Maybe
a Column edit type of 'CheckBox'?
2. If I do use an arraybrowse like here ...... I want to set the X just
with the Spacebar ... I can add code to the oGridEdit:onChar event and
detect nKey=32 but dont know how to return an X to the screen.
3. If I do use an arraybrowse like here ...... I want to minimise keypresses
and EXIT my get using the UP/DOWN keys but I think these are captured at the
browse level and I cannot find an event to capture them and force the
oGridEdit to exit.
Any suggestions would be appreciated.
Regards, Chris
1) In case is not a row edition (check the method IsMultipleEdit) I suggest
you use two images for checked & unchecked and change its value on the
TBrwColumn:OnEdit event and returning false. In case is a row edition I
suggest you use a listbox with the values 'Yes' & 'No'
2) It seems you already got this working
3) The keys are first processed by the TBrwColumn:oGridEdit and you can trap
them with oGridEdit:KeyDown() if you want. BTW the Key down and key up are
stopped on the control to avoid the propagation to its container browse.
You may overload TGridEdit to receive those events:
CLASS TGridEdit FROM XGridEdit
METHOD WMKeyDown( nKey, nFlags, hWnd )
END CLASS
METHOD WMKeyDown( nKey, nFlags, hWnd ) CLASS TGridEdit
IF nKey == VK_UP .OR. nKey == VK_DOWN
::OnKeyDown( nKey, nFlags )
ENDIF
RETURN Super:WMKeyDown( nKey, nFlags, hWnd )
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
http://www.xailer.com/forum
http://www.xailer.com/dokuwiki
"Chris Gillard" escribió en el mensaje de
noticias:4d777a45$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
Hi,
I want to create a list of say 'Clubs' or 'Interests' that a person has and
allow them to 'tick' the 'Cluds or 'Interests' they have. The List of
'Clubs' or 'Interests' are maintained in a .dbf.
I have loaded an array browse from the dbf with the necessary columns and an
extra column for the 'ticks' ... see image.
I have made column 3 editable ..... so I can type say an X in the column
where necessary.
My questions are ....
1. Is there a Xailer control that would do this for me more easily? Maybe
a Column edit type of 'CheckBox'?
2. If I do use an arraybrowse like here ...... I want to set the X just
with the Spacebar ... I can add code to the oGridEdit:onChar event and
detect nKey=32 but dont know how to return an X to the screen.
3. If I do use an arraybrowse like here ...... I want to minimise keypresses
and EXIT my get using the UP/DOWN keys but I think these are captured at the
browse level and I cannot find an event to capture them and force the
oGridEdit to exit.
Any suggestions would be appreciated.
Regards, Chris
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
Control with array List 'tick' boxes ....
Chris,
you can do it with a Treeview control.
Drop a TTreeview on a form and set lLinesAtRoot to .F. and lCheckBoxes to
.F., add the items and you are done.
To check what items are selected just loop the :aItems property:
AEval( ::oTreeview:aItems, {|oItem| IIf( oItem:lChecked, ...
Saludos,
José Lalín
you can do it with a Treeview control.
Drop a TTreeview on a form and set lLinesAtRoot to .F. and lCheckBoxes to
.F., add the items and you are done.
To check what items are selected just loop the :aItems property:
AEval( ::oTreeview:aItems, {|oItem| IIf( oItem:lChecked, ...
Saludos,
José Lalín
Control with array List 'tick' boxes ....
Chris,
> lCheckBoxes to .F., add the items and you are done.
ups, I meant .T.
Regards,
José Lalín
> lCheckBoxes to .F., add the items and you are done.
ups, I meant .T.
Regards,
José Lalín
-
- Mensajes: 384
- Registrado: Mar May 01, 2007 5:49 pm
Control with array List 'tick' boxes ....
Ignacio,
Thanks for your time in explaining some of the inner workings.
The overloading of Methods is something I need to remember particularly for
key handling in special cases.
I will see how I get on.
Thanks
Chris
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
news:[email=4d77a10a@svctag-j7w3v3j....]4d77a10a@svctag-j7w3v3j....[/email]
> Hi,
>
> 1) In case is not a row edition (check the method IsMultipleEdit) I
> suggest you use two images for checked & unchecked and change its value on
> the TBrwColumn:OnEdit event and returning false. In case is a row edition
> I suggest you use a listbox with the values 'Yes' & 'No'
>
> 2) It seems you already got this working
>
> 3) The keys are first processed by the TBrwColumn:oGridEdit and you can
> trap them with oGridEdit:KeyDown() if you want. BTW the Key down and key
> up are stopped on the control to avoid the propagation to its container
> browse.
>
> You may overload TGridEdit to receive those events:
>
> CLASS TGridEdit FROM XGridEdit
>
> METHOD WMKeyDown( nKey, nFlags, hWnd )
>
> END CLASS
>
> METHOD WMKeyDown( nKey, nFlags, hWnd ) CLASS TGridEdit
>
> IF nKey == VK_UP .OR. nKey == VK_DOWN
> ::OnKeyDown( nKey, nFlags )
> ENDIF
>
> RETURN Super:WMKeyDown( nKey, nFlags, hWnd )
>
>
>
>
> Ignacio Ortiz de Zúñiga
> [Equipo de Xailer / Xailer team]
> http://www.xailer.com
> http://www.xailer.info
> http://www.xailer.com/forum
> http://www.xailer.com/dokuwiki
> "Chris Gillard" escribió en el mensaje de
> noticias:4d777a45$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>
> Hi,
>
> I want to create a list of say 'Clubs' or 'Interests' that a person has
> and
> allow them to 'tick' the 'Cluds or 'Interests' they have. The List of
> 'Clubs' or 'Interests' are maintained in a .dbf.
>
> I have loaded an array browse from the dbf with the necessary columns and
> an
> extra column for the 'ticks' ... see image.
>
> I have made column 3 editable ..... so I can type say an X in the column
> where necessary.
>
> My questions are ....
>
> 1. Is there a Xailer control that would do this for me more easily?
> Maybe
> a Column edit type of 'CheckBox'?
>
> 2. If I do use an arraybrowse like here ...... I want to set the X just
> with the Spacebar ... I can add code to the oGridEdit:onChar event and
> detect nKey=32 but dont know how to return an X to the screen.
>
> 3. If I do use an arraybrowse like here ...... I want to minimise
> keypresses
> and EXIT my get using the UP/DOWN keys but I think these are captured at
> the
> browse level and I cannot find an event to capture them and force the
> oGridEdit to exit.
>
> Any suggestions would be appreciated.
>
> Regards, Chris
>
>
>
>
>
Thanks for your time in explaining some of the inner workings.
The overloading of Methods is something I need to remember particularly for
key handling in special cases.
I will see how I get on.
Thanks
Chris
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
news:[email=4d77a10a@svctag-j7w3v3j....]4d77a10a@svctag-j7w3v3j....[/email]
> Hi,
>
> 1) In case is not a row edition (check the method IsMultipleEdit) I
> suggest you use two images for checked & unchecked and change its value on
> the TBrwColumn:OnEdit event and returning false. In case is a row edition
> I suggest you use a listbox with the values 'Yes' & 'No'
>
> 2) It seems you already got this working
>
> 3) The keys are first processed by the TBrwColumn:oGridEdit and you can
> trap them with oGridEdit:KeyDown() if you want. BTW the Key down and key
> up are stopped on the control to avoid the propagation to its container
> browse.
>
> You may overload TGridEdit to receive those events:
>
> CLASS TGridEdit FROM XGridEdit
>
> METHOD WMKeyDown( nKey, nFlags, hWnd )
>
> END CLASS
>
> METHOD WMKeyDown( nKey, nFlags, hWnd ) CLASS TGridEdit
>
> IF nKey == VK_UP .OR. nKey == VK_DOWN
> ::OnKeyDown( nKey, nFlags )
> ENDIF
>
> RETURN Super:WMKeyDown( nKey, nFlags, hWnd )
>
>
>
>
> Ignacio Ortiz de Zúñiga
> [Equipo de Xailer / Xailer team]
> http://www.xailer.com
> http://www.xailer.info
> http://www.xailer.com/forum
> http://www.xailer.com/dokuwiki
> "Chris Gillard" escribió en el mensaje de
> noticias:4d777a45$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>
> Hi,
>
> I want to create a list of say 'Clubs' or 'Interests' that a person has
> and
> allow them to 'tick' the 'Cluds or 'Interests' they have. The List of
> 'Clubs' or 'Interests' are maintained in a .dbf.
>
> I have loaded an array browse from the dbf with the necessary columns and
> an
> extra column for the 'ticks' ... see image.
>
> I have made column 3 editable ..... so I can type say an X in the column
> where necessary.
>
> My questions are ....
>
> 1. Is there a Xailer control that would do this for me more easily?
> Maybe
> a Column edit type of 'CheckBox'?
>
> 2. If I do use an arraybrowse like here ...... I want to set the X just
> with the Spacebar ... I can add code to the oGridEdit:onChar event and
> detect nKey=32 but dont know how to return an X to the screen.
>
> 3. If I do use an arraybrowse like here ...... I want to minimise
> keypresses
> and EXIT my get using the UP/DOWN keys but I think these are captured at
> the
> browse level and I cannot find an event to capture them and force the
> oGridEdit to exit.
>
> Any suggestions would be appreciated.
>
> Regards, Chris
>
>
>
>
>
-
- Mensajes: 384
- Registrado: Mar May 01, 2007 5:49 pm
Control with array List 'tick' boxes ....
Jose,
Thanks for guiding me towards a TTreeview with check boxes.
I am experimenting with that and it is almost perfect.
Thanks
Chris
"José Lalín" <dezac@corevia.com> wrote in message
news:4d77a99a$[email=2@svctag-j7w3v3j....]2@svctag-j7w3v3j....[/email]
Chris,
you can do it with a Treeview control.
Drop a TTreeview on a form and set lLinesAtRoot to .F. and lCheckBoxes to
..F., add the items and you are done.
To check what items are selected just loop the :aItems property:
AEval( ::oTreeview:aItems, {|oItem| IIf( oItem:lChecked, ...
Saludos,
José Lalín
Thanks for guiding me towards a TTreeview with check boxes.
I am experimenting with that and it is almost perfect.
Thanks
Chris
"José Lalín" <dezac@corevia.com> wrote in message
news:4d77a99a$[email=2@svctag-j7w3v3j....]2@svctag-j7w3v3j....[/email]
Chris,
you can do it with a Treeview control.
Drop a TTreeview on a form and set lLinesAtRoot to .F. and lCheckBoxes to
..F., add the items and you are done.
To check what items are selected just loop the :aItems property:
AEval( ::oTreeview:aItems, {|oItem| IIf( oItem:lChecked, ...
Saludos,
José Lalín
Control with array List 'tick' boxes ....
Chris,
you are welcome!
Regards,
José Lalín
you are welcome!
Regards,
José Lalín