programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: Listbox selection, value arrays

From: Anil Rodrigues <arodrix_at_weld.com>
Date: Thu, 30 Nov 2006 14:55:54 -0500

Thanks Charles;

1. I tried LB_SETHORIZONTALEXTENT , with adding WS_HSCROLL, but
   it remained the same. But I then tried LB_SETCOLUMNWIDTH,
   and this seems to work, even without using multicolumn style.

2. That looks like what I had in mind; ( Edit: cells; _@_ -> @)
   I'm not sure there is a 'profit' in this ( as opposed to
   varibles, but since I'm using handle values in a number of
   places, I thought it may be nice.

Appreciate it,
Cheers! Anil

-----Original Message-----
From: Charles Melice [mailto:3d_at_forthcad.com]
Sent: Wednesday, November 29, 2006 2:31 PM
To: sftalk_at_forth.com
Subject: [sftalk] Re: Listbox selection, value arrays

----- 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 + __@__ ; \ < edit

: [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
----------------------------------------------------------------------

----------------------------------------------------------------------
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 Thu Nov 30 2006 - 11:56:37 PST

This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:41 PST