Alrighty then,
VFP9 grid, with a check box as control for each record. Click on the check
box and print a document, great. Grid will have up to 1,200 records in and
they need to be able to highlight a range, or click on one and the final
one (say ten records down) and have the check boxes check in between. Like
a multiple select.
Has anyone done this.... Could prompt for a range of records, seems a
little clumsy, multiple select would be good....
Regards,
Desmond
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAAJXvaNBU+gYbfDP=wdvHptiqA8YzKuv=BQPDG-OYeD6i8t4rg@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Haven't tried it but I remember doing something like this a long time ago.
Instead of using just the Click event on the Checkbox, you might try using
the MouseUp event and check the nShift parameter and sets a flag that Click
can use to set a start row / end row. Flag not set, start row, flag set end
row. If you've got both a start and an end, mark those in between. Once
marked, clear both start/end rows.
Something along those lines should work, don't have the time to try it
today.
Fred
On Fri, Oct 21, 2011 at 11:01 AM, Desmond Lloyd <desmond.lloyd@gmail.com>wrote:
> Alrighty then,
>
> VFP9 grid, with a check box as control for each record. Click on the
> check
> box and print a document, great. Grid will have up to 1,200 records in
> and
> they need to be able to highlight a range, or click on one and the final
> one (say ten records down) and have the check boxes check in between. Like
> a multiple select.
>
> Has anyone done this.... Could prompt for a range of records, seems a
> little clumsy, multiple select would be good....
>
> Regards,
> Desmond
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJCBksoi1CWWFzKUyB1Zmb8G+U7c3NosKwR-56ob4kF3N238jg@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
That's really more like listbox behavior. Not sure what the performance of a list control with 1200 items would be.
I usually provide some way to do a check/uncheck all. You could also have an invert selection button. Other than that, you'd probably have to get into some pretty fancy mouse down, drag coordinate tracking to do what you want with a grid.
--
rk
-----Original Message-----
From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com] On Behalf Of Desmond Lloyd
Sent: Friday, October 21, 2011 2:01 PM
To: profoxtech@leafe.com
Subject: VFP9: Multiple Check Box Clicks
Alrighty then,
VFP9 grid, with a check box as control for each record. Click on the check box and print a document, great. Grid will have up to 1,200 records in and they need to be able to highlight a range, or click on one and the final one (say ten records down) and have the check boxes check in between. Like a multiple select.
Has anyone done this.... Could prompt for a range of records, seems a little clumsy, multiple select would be good....
Regards,
Desmond
--- StripMime Report -- processed MIME parts --- multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD04419F4B78AE5@ACKBWDDQH1.artfact.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Desmond,
I have some old code that does that (this is really old so no guarantees):
Add a property to your form called
ilCallMultiSelect
and set it to .F.
add a checkbox to a column in the grid and delete the default textbox
that's there.
This is the checkbox's MouseDown():
LPARAMETERS nButton, nShift, nXCoord, nYCoord
* nButton = 1 (left), 2 (right), or 4 (middle).
#DEFINE SHIFTKEY 1
#DEFINE LEFTMOUSEBUTTON 1
IF nButton = LEFTMOUSEBUTTON AND nShift = SHIFTKEY
THISFORM.ilCallMultiSelect = .T.
ENDIF
Checkbox's Click():
WITH THISFORM
IF .ilCallMultiSelect = .T.
.ilCallMultiSelect = .F.
MultiSelectCustomers(iOwnerId, 'PrintLetter', 0, 1)
ENDIF
ENDWITH
CheckBox's KeyPress()
LPARAMETERS nkeycode,nshiftaltctrl
IF MultiSelectCustomers(v_SaleLetters.iOwnerId, 'PrintLetter', nkeycode,
nshiftaltctrl)
THIS.Refresh()
ENDIF
DODEFAULT(nkeycode,nshiftaltctrl)
This is my MultiSelectCustomers program:
LPARAMETERS tiCustId, tcField, nKeyCode, nShiftAltCtrl
LOCAL llFound, llRetVal
* we want to let the user hold the shift key down while selecting an item
* and if it is down then all items between this one and the next one
above it will be selected
#DEFINE SHIFTKEY 1
#DEFINE ENTERKEY 13
#DEFINE SPACEBAR 32
#DEFINE LEFTMOUSE 0
IF (nShiftAltCtrl = SHIFTKEY AND INLIST(nKeyCode, ENTERKEY, SPACEBAR))
AND NOT EVAL(tcField);
OR (nShiftAltCtrl = SHIFTKEY AND nKeyCode = LEFTMOUSE AND
EVAL(tcField))
* skip backwards until we find a selected one
DO WHILE !BOF()
SKIP -1
IF EVAL(tcField)
llFound = .T.
EXIT
ENDIF
ENDDO
IF llFound
DO WHILE .T. && iCustid # tiCustId
REPLACE (tcField) WITH .T.
IF iOwnerid # tiCustId
SKIP
ELSE
EXIT
ENDIF
ENDDO
ELSE
LOCATE FOR iOwnerId = tiCustId
ENDIF
llRetVal = .T.
ENDIF
RETURN llRetVal
Frank.
Frank Cazabon
On 21/10/2011 02:01 PM, Desmond Lloyd wrote:
> Alrighty then,
>
> VFP9 grid, with a check box as control for each record. Click on the check
> box and print a document, great. Grid will have up to 1,200 records in and
> they need to be able to highlight a range, or click on one and the final
> one (say ten records down) and have the check boxes check in between. Like
> a multiple select.
>
> Has anyone done this.... Could prompt for a range of records, seems a
> little clumsy, multiple select would be good....
>
> Regards,
> Desmond
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4EA1B872.2060501@gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Thank you everyone for your quick responses! Am going to try the code
below. Already have a checkbox in the grid, so will modify accordingly....
Many, many thanks!
Regards,
Desmond
On 21 October 2011 13:22, Frank Cazabon <frank.cazabon@gmail.com> wrote:
> Desmond,
>
> I have some old code that does that (this is really old so no guarantees):
>
> Add a property to your form called
>
> ilCallMultiSelect
> and set it to .F.
>
> add a checkbox to a column in the grid and delete the default textbox
> that's there.
>
> This is the checkbox's MouseDown():
>
> LPARAMETERS nButton, nShift, nXCoord, nYCoord
>
> * nButton = 1 (left), 2 (right), or 4 (middle).
>
> #DEFINE SHIFTKEY 1
> #DEFINE LEFTMOUSEBUTTON 1
>
> IF nButton = LEFTMOUSEBUTTON AND nShift = SHIFTKEY
> THISFORM.ilCallMultiSelect = .T.
> ENDIF
>
> Checkbox's Click():
>
> WITH THISFORM
> IF .ilCallMultiSelect = .T.
> .ilCallMultiSelect = .F.
> MultiSelectCustomers(iOwnerId, 'PrintLetter', 0, 1)
> ENDIF
> ENDWITH
>
> CheckBox's KeyPress()
>
> LPARAMETERS nkeycode,nshiftaltctrl
>
> IF MultiSelectCustomers(v_SaleLetters.iOwnerId, 'PrintLetter', nkeycode,
> nshiftaltctrl)
> THIS.Refresh()
> ENDIF
> DODEFAULT(nkeycode,nshiftaltctrl)
>
> This is my MultiSelectCustomers program:
>
> LPARAMETERS tiCustId, tcField, nKeyCode, nShiftAltCtrl
>
> LOCAL llFound, llRetVal
> * we want to let the user hold the shift key down while selecting an item
> * and if it is down then all items between this one and the next one
> above it will be selected
>
> #DEFINE SHIFTKEY 1
> #DEFINE ENTERKEY 13
> #DEFINE SPACEBAR 32
> #DEFINE LEFTMOUSE 0
>
> IF (nShiftAltCtrl = SHIFTKEY AND INLIST(nKeyCode, ENTERKEY, SPACEBAR))
> AND NOT EVAL(tcField);
> OR (nShiftAltCtrl = SHIFTKEY AND nKeyCode = LEFTMOUSE AND
> EVAL(tcField))
>
> * skip backwards until we find a selected one
> DO WHILE !BOF()
> SKIP -1
> IF EVAL(tcField)
> llFound = .T.
> EXIT
> ENDIF
> ENDDO
>
> IF llFound
> DO WHILE .T. && iCustid # tiCustId
> REPLACE (tcField) WITH .T.
> IF iOwnerid # tiCustId
> SKIP
> ELSE
> EXIT
> ENDIF
> ENDDO
> ELSE
> LOCATE FOR iOwnerId = tiCustId
> ENDIF
> llRetVal = .T.
> ENDIF
>
> RETURN llRetVal
>
>
> Frank.
>
> Frank Cazabon
>
>
>
> On 21/10/2011 02:01 PM, Desmond Lloyd wrote:
> > Alrighty then,
> >
> > VFP9 grid, with a check box as control for each record. Click on the
> check
> > box and print a document, great. Grid will have up to 1,200 records in
> and
> > they need to be able to highlight a range, or click on one and the final
> > one (say ten records down) and have the check boxes check in between.
> Like
> > a multiple select.
> >
> > Has anyone done this.... Could prompt for a range of records, seems a
> > little clumsy, multiple select would be good....
> >
> > Regards,
> > Desmond
> >
> >
> > --- StripMime Report -- processed MIME parts ---
> > multipart/alternative
> > text/plain (text body -- kept)
> > text/html
> > ---
> >
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAAJXvaPxNXQZ=bbwRu=fgeZ=RMahBEjGVGgtUR4F=VhAsDJT_Q@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
here's another one
http://www.tek-tips.com/faqs.cfm?fid=433
Kind regards
Andrew Stirling
On 21/10/2011 19:40, Desmond Lloyd wrote:
> Thank you everyone for your quick responses! Am going to try the code
> below. Already have a checkbox in the grid, so will modify accordingly....
>
> Many, many thanks!
>
> Regards,
> Desmond
>
>
>
>
>
> On 21 October 2011 13:22, Frank Cazabon<frank.cazabon@gmail.com> wrote:
>
>> Desmond,
>>
>> I have some old code that does that (this is really old so no guarantees):
>>
>> Add a property to your form called
>>
>> ilCallMultiSelect
>> and set it to .F.
>>
>> add a checkbox to a column in the grid and delete the default textbox
>> that's there.
>>
>> This is the checkbox's MouseDown():
>>
>> LPARAMETERS nButton, nShift, nXCoord, nYCoord
>>
>> * nButton = 1 (left), 2 (right), or 4 (middle).
>>
>> #DEFINE SHIFTKEY 1
>> #DEFINE LEFTMOUSEBUTTON 1
>>
>> IF nButton = LEFTMOUSEBUTTON AND nShift = SHIFTKEY
>> THISFORM.ilCallMultiSelect = .T.
>> ENDIF
>>
>> Checkbox's Click():
>>
>> WITH THISFORM
>> IF .ilCallMultiSelect = .T.
>> .ilCallMultiSelect = .F.
>> MultiSelectCustomers(iOwnerId, 'PrintLetter', 0, 1)
>> ENDIF
>> ENDWITH
>>
>> CheckBox's KeyPress()
>>
>> LPARAMETERS nkeycode,nshiftaltctrl
>>
>> IF MultiSelectCustomers(v_SaleLetters.iOwnerId, 'PrintLetter', nkeycode,
>> nshiftaltctrl)
>> THIS.Refresh()
>> ENDIF
>> DODEFAULT(nkeycode,nshiftaltctrl)
>>
>> This is my MultiSelectCustomers program:
>>
>> LPARAMETERS tiCustId, tcField, nKeyCode, nShiftAltCtrl
>>
>> LOCAL llFound, llRetVal
>> * we want to let the user hold the shift key down while selecting an item
>> * and if it is down then all items between this one and the next one
>> above it will be selected
>>
>> #DEFINE SHIFTKEY 1
>> #DEFINE ENTERKEY 13
>> #DEFINE SPACEBAR 32
>> #DEFINE LEFTMOUSE 0
>>
>> IF (nShiftAltCtrl = SHIFTKEY AND INLIST(nKeyCode, ENTERKEY, SPACEBAR))
>> AND NOT EVAL(tcField);
>> OR (nShiftAltCtrl = SHIFTKEY AND nKeyCode = LEFTMOUSE AND
>> EVAL(tcField))
>>
>> * skip backwards until we find a selected one
>> DO WHILE !BOF()
>> SKIP -1
>> IF EVAL(tcField)
>> llFound = .T.
>> EXIT
>> ENDIF
>> ENDDO
>>
>> IF llFound
>> DO WHILE .T.&& iCustid # tiCustId
>> REPLACE (tcField) WITH .T.
>> IF iOwnerid # tiCustId
>> SKIP
>> ELSE
>> EXIT
>> ENDIF
>> ENDDO
>> ELSE
>> LOCATE FOR iOwnerId = tiCustId
>> ENDIF
>> llRetVal = .T.
>> ENDIF
>>
>> RETURN llRetVal
>>
>>
>> Frank.
>>
>> Frank Cazabon
>>
>>
>>
>> On 21/10/2011 02:01 PM, Desmond Lloyd wrote:
>>> Alrighty then,
>>>
>>> VFP9 grid, with a check box as control for each record. Click on the
>> check
>>> box and print a document, great. Grid will have up to 1,200 records in
>> and
>>> they need to be able to highlight a range, or click on one and the final
>>> one (say ten records down) and have the check boxes check in between.
>> Like
>>> a multiple select.
>>>
>>> Has anyone done this.... Could prompt for a range of records, seems a
>>> little clumsy, multiple select would be good....
>>>
>>> Regards,
>>> Desmond
>>>
>>>
>>> --- StripMime Report -- processed MIME parts ---
>>> multipart/alternative
>>> text/plain (text body -- kept)
>>> text/html
>>> ---
>>>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4EA1CC6E.9060603@calcpay.co.uk
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
You could forget the checkbox and just use one of the dynamic colours
Allen
-----Original Message-----
From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com] On
Behalf Of Desmond Lloyd
Alrighty then,
VFP9 grid, with a check box as control for each record. Click on the check
box and print a document, great. Grid will have up to 1,200 records in and
they need to be able to highlight a range, or click on one and the final
one (say ten records down) and have the check boxes check in between. Like
a multiple select.
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/003001cc9031$615290e0$23f7b2a0$@com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
On 10/21/2011 11:01 AM, Desmond Lloyd wrote:
> Alrighty then,
>
> VFP9 grid, with a check box as control for each record. Click on the check
> box and print a document, great. Grid will have up to 1,200 records in and
> they need to be able to highlight a range, or click on one and the final
> one (say ten records down) and have the check boxes check in between. Like
> a multiple select.
>
> Has anyone done this.... Could prompt for a range of records, seems a
> little clumsy, multiple select would be good....
>
> Regards,
> Desmond
>
>
I use filtering to get the records I want in a grid. Look at Sweet
Potato Software's Grid Extras:
http://www.sweetpotatosoftware.com/spsblog/PermaLink,guid,d6d71562-1655-4518-9341-527932970583.aspx
or
*http://tinyurl.com/6bvwy9l*
I use filtering of the grid to narrow down the range and I plan on using
the check box method to get only those that I want.
HTH
Jeff
---------------
Jeff Johnson
jeff@san-dc.com
(623) 582-0323
www.san-dc.com
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4EA430F9.106@san-dc.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.