Re: Listbox selection, value arrays

From: Charles Melice <3d_at_forthcad.com>
Date: Wed, 29 Nov 2006 20:30:48 +0100

----- Original Message -----
From: "Anil Rodrigues" <arodrix_at_weld.com>
To: <sftalk_at_forth.com>
Sent: Monday, November 27, 2006 6:57 PM
Subject: [sftalk] Listbox selection, value arrays

> Below is pasted source for an include file, which when loaded
> makes a window with 2 listbox panes, and some buttons.
>
> 1. Clicking in a listbox makes a dotted selection rectangle appear,
> but it does not extend the width of the box. Are there any
> properties or settings to make the dots - selection width - go
> right across the box?

Try to use LB_SETHORIZONTALEXTENT with the maximum usable text width.

>
> 2. See hb0,1,2,3
> I can make an indexed array using variables, but is there a way
> to make an indexed array of values to use in a do loop ?
>

Yes, but I don't see any profit:

: val-array ( size "name" -- )
    create cells allot does> swap ells + __@__ ;

: [ito] ( val index "name" -- )
    state @ 0= abort" compile only"
    postpone cells
    ' >body postpone literal
    postpone +
    postpone ! ; immediate

Charles

[..]

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Wed Nov 29 2006 - 11:31:46 PST


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 09-Feb-2012. Archive updated nightly.