CW List Box Properties 
Author Message
 CW List Box Properties

I have seen several demos where one could click on the column headings
of a CW list box and the headings would act like buttons. Does anyone
have some sample code for this, or a list of properties ?

Thanks,

Steve Olensky, V.P.
Software Technology, Inc.
800-844-0884 http://www.*-*-*.com/



Sat, 16 Oct 1999 03:00:00 GMT  
 CW List Box Properties



Quote:
> I have seen several demos where one could click on the column headings
> of a CW list box and the headings would act like buttons. Does anyone
> have some sample code for this, or a list of properties ?

ToolCraft (www.toolcraft.com - the makers of PowerBrowse) has "Header
Buttons"  in their PowerSuite bundle that does this.

--
Jeff Berlinghoff
Florida Department of Environmental Protection
Division of Law Enforcement

ngw.dep.state.fl.us



Sat, 16 Oct 1999 03:00:00 GMT  
 CW List Box Properties

Quote:

>I have seen several demos where one could click on the column headings
>of a CW list box and the headings would act like buttons. Does anyone
>have some sample code for this, or a list of properties ?

Try this:

Que                    QUEUE

F1                        STRING(50)
F2                        STRING(50)
F3                        STRING(50)
                        END
WinView
WINDOW('View'),AT(,,340,200),SYSTEM,CENTER,ALRT(MouseLeft)

LIST,AT(20,0,300,200),USE(?List),FROM(Que),HVSCROLL,    |

FORMAT('80L~F1~80L~F2~80L~F3~')
                        END
CurrentSort BYTE(1)

  CODE                                            ! Begin processed
code
    OPEN(WinView)
    DO BuildListQue
    ACCEPT
        CASE EVENT()
        OF EVENT:PreAlertKey
            CYCLE
!Allow standard LIST clicks to process
        OF EVENT:AlertKey
            IF ?List{PROPLIST:MouseDownRow} = 0
!Check for click in header

EXECUTE ?List{PROPLIST:MouseDownField}                !Check which
header
                    EXECUTE CurrentSort
                        DO SortByF1
                        DO SortByF2
                        DO SortByF3
                    END
                    EXECUTE CurrentSort
                        DO SortByF2
                        DO SortByF3
                        DO SortByF1
                    END
                    EXECUTE CurrentSort
                        DO SortByF3
                        DO SortByF1
                        DO SortByF2
                .    .
                DISPLAY
    .    .    .
    FREE(Que)

SortByF1    ROUTINE

    SORT(Que,Que.F1)
    ?List{PROP:Format} = '80L~F1~#1#80L~F2~#2#80L~F3~#3#'
    CurrentSort = 1
SortByF2    ROUTINE
    SORT(Que,Que.F2)
    ?List{PROP:Format} = '80L~F2~#2#80L~F3~#3#80L~F1~#1#'
    CurrentSort = 2
SortByF3    ROUTINE
    SORT(Que,Que.F3)
    ?List{PROP:Format} = '80L~F3~#3#80L~F1~#1#80L~F2~#2#'
    CurrentSort = 3
BuildListQue ROUTINE
    LOOP Y# = 1 TO 9
        Que.F1 = 'Que.F1 - ' & Y#
        Que.F2 = 'Que.F2 - ' & RANDOM(10,99)
        Que.F3 = 'Que.F3 - ' & RANDOM(100,999)
        ADD(Que)

    END

+============================================================>
| Jim DeFabia         TopSpeed Corporation-Documentation

| Standard Disclaimer: These opinions are mine & mine alone.
+============================================================>



Sun, 17 Oct 1999 03:00:00 GMT  
 CW List Box Properties

Hi Jim,


Quote:

>            IF ?List{PROPLIST:MouseDownRow} = 0

This property is not documented in the 2.002.01 help for PROPLIST...
Oops, sorry...  It is documented in my 1.5 manual, so it must be
somewhere in the 2.002 help.  Heck, I've never found this page!  This
opens up some new possibilities:)  Always something new to learn...
Now:  Is it possible to make the header row appear "pushed" like a
button to indicate a sorting order...  Guess one could use some other
methods too.

Best regards,

Arnor Baldvinsson
Allerup Edb
Tel: +45 4675 7122
Fax: +45 4675 7144
Denmark


http://www.icetips.com

Opinions are mine, and mine alone!



Sun, 17 Oct 1999 03:00:00 GMT  
 CW List Box Properties

G'day Jim!


Quote:
>>I have seen several demos where one could click on the column headings
>>of a CW list box and the headings would act like buttons. Does anyone
>>have some sample code for this, or a list of properties ?
>Try this:

[CODE SNIPPED]

Jim, this is a terrific bit of code and of great help. Can this be
adapted easily for a page-loaded browse box using {Prop:Order} or
something similar? If so, it would halve the number of keys required,
plus provide even more ways to sort browses.

Put this one down for tip of the month
--
Steve Greenwood
HiCaliber Software



Sun, 17 Oct 1999 03:00:00 GMT  
 CW List Box Properties



Quote:

> >I have seen several demos where one could click on the column headings
> >of a CW list box and the headings would act like buttons. Does anyone
> >have some sample code for this, or a list of properties ?
> Try this:

> Que                    QUEUE

Cool! Thanks!

--
Tom Ruby
--------------------------------------------------------------------

http://www.netins.net/showcase/tomruby/
(It must be time to figure out a new tag line)



Mon, 18 Oct 1999 03:00:00 GMT  
 CW List Box Properties

Jim,

This works great, however is there a way to make the column heading
act like a button when pressed ?


Quote:

>>I have seen several demos where one could click on the column headings
>>of a CW list box and the headings would act like buttons. Does anyone
>>have some sample code for this, or a list of properties ?
>Try this:
>Que                    QUEUE
>F1                        STRING(50)
>F2                        STRING(50)
>F3                        STRING(50)
>                        END
>WinView
>WINDOW('View'),AT(,,340,200),SYSTEM,CENTER,ALRT(MouseLeft)
>LIST,AT(20,0,300,200),USE(?List),FROM(Que),HVSCROLL,    |
>FORMAT('80L~F1~80L~F2~80L~F3~')
>                        END
>CurrentSort BYTE(1)
>  CODE                                            ! Begin processed
>code
>    OPEN(WinView)
>    DO BuildListQue
>    ACCEPT
>        CASE EVENT()
>        OF EVENT:PreAlertKey
>            CYCLE
>!Allow standard LIST clicks to process
>        OF EVENT:AlertKey
>            IF ?List{PROPLIST:MouseDownRow} = 0
>!Check for click in header
>EXECUTE ?List{PROPLIST:MouseDownField}                !Check which
>header
>                    EXECUTE CurrentSort
>                        DO SortByF1
>                        DO SortByF2
>                        DO SortByF3
>                    END
>                    EXECUTE CurrentSort
>                        DO SortByF2
>                        DO SortByF3
>                        DO SortByF1
>                    END
>                    EXECUTE CurrentSort
>                        DO SortByF3
>                        DO SortByF1
>                        DO SortByF2
>                .    .
>                DISPLAY
>    .    .    .
>    FREE(Que)
>SortByF1    ROUTINE
>    SORT(Que,Que.F1)
>    ?List{PROP:Format} = '80L~F1~#1#80L~F2~#2#80L~F3~#3#'
>    CurrentSort = 1
>SortByF2    ROUTINE
>    SORT(Que,Que.F2)
>    ?List{PROP:Format} = '80L~F2~#2#80L~F3~#3#80L~F1~#1#'
>    CurrentSort = 2
>SortByF3    ROUTINE
>    SORT(Que,Que.F3)
>    ?List{PROP:Format} = '80L~F3~#3#80L~F1~#1#80L~F2~#2#'
>    CurrentSort = 3
>BuildListQue ROUTINE
>    LOOP Y# = 1 TO 9
>        Que.F1 = 'Que.F1 - ' & Y#
>        Que.F2 = 'Que.F2 - ' & RANDOM(10,99)
>        Que.F3 = 'Que.F3 - ' & RANDOM(100,999)
>        ADD(Que)
>    END
>+============================================================>
>| Jim DeFabia         TopSpeed Corporation-Documentation

>| Standard Disclaimer: These opinions are mine & mine alone.
>+============================================================>

Steve Olensky, V.P.
Software Technology, Inc.
800-844-0884 http://www.ssts.com


Mon, 18 Oct 1999 03:00:00 GMT  
 CW List Box Properties

Quote:

>>            IF ?List{PROPLIST:MouseDownRow} = 0
>This property is not documented in the 2.002.01 help for PROPLIST...
>Oops, sorry...  It is documented in my 1.5 manual, so it must be

        You said it. I have been using the property for
        over a year and _never_ knew that zero might
        imply the header row!!!

Markku



Tue, 19 Oct 1999 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. cw 2.0003, filter box on report properties is too small, need help...mucho

2. AT property for a list box

3. List box mouse click properties

4. CW 2.003 Multi-Line List Box won't scroll

5. LIST BOX AND DROP DOWN LIST BOX

6. Q: Sorting List Box by Local Variable (CW 2.002)

7. CW 2.0 List Box Handling

8. Lost ToolBox, Property Box and Field Box !!

9. check box in edit in place list box

10. check box in edit in place list box

11. Combo Boxes / List Boxes

12. get value of a combo box or a list box in embeds

 

 
Powered by phpBB® Forum Software