1. Win32Lib: making a "List Table"?

I think I would like to use a "List Table" in an app, (like a list box, but
in table format to show association between items); when an item in one part
of the table is selected, the whole line is too.

I made a simple example, but I wonder if it couldn't be better.  My concerns
with it are:
1.  since I made it by just putting list boxes side by side, I don't know
how well that "registration" works on systems with other video settings;
it's *supposed* to look simply like a table, & does on my system;
2.  it "jerks" when items in it are selected, because the primary selected
item responds to mouse button down, and the others don't respond until mouse
button goes up.

Any suggestions?  (perhaps this is a candidate for a new control??)

Dan Moyer

-- code begins:

--  code generated by Win32Lib IDE v0.8
--  A LIST TABLE:
--  information is displayed in table form, and selecting any item selects
--  its associated parameters on same line of table

include Win32Lib.ew
without warning

-----------------------------------------------------------------------
--  Window Window1
global constant Window1 = create( Window, "a List Table", 0, Default,
Default, 780, 456+ 19, 0 )
global constant List1 = create( List, "List1", Window1, 100, 60, 199, 120,
0 )
global constant List2 = create( List, "List2", Window1, 300, 60, 200, 120,
0 )
global constant List3 = create( List, "List3", Window1, 501, 60, 200, 120,
0 )
global constant Label1  = create(CText, "Click on an item, and associated
parameters will also be selected:", Window1, 100, 20, 550, 28, 0)
--------------------------------------------------------------------------
-- populate lists with stuff on open:
procedure Window1_onOpen ()

addItem(List1,"an item")
addItem(List1,"another item")
addItem(List2,"1st parameter")
addItem(List2,"another 1st parameter")
addItem(List3,"2nd parameter")
addItem(List3,"another 2nd parameter")

-- set top line in all lists selected if anything in at least one of them:
if getCount(List1) > 0 or getCount(List2) > 0
 or getCount(List3) > 0 then
   setIndex(List1, 1)
   setIndex(List2, 1)
   setIndex(List3, 1)
end if
end procedure
onOpen[Window1] = routine_id("Window1_onOpen")

-----------------------------------------------
-- when item in list1 is selected, things in other lists on same line
-- are also selected
procedure List1_onChange ()
object result
integer index
index = getIndex(List1)
if index> 0 then
   setIndex(List2,index)
   setIndex(List3,index)
end if
end procedure
onChange[List1] = routine_id("List1_onChange")

------------------------------------------------------------------------

WinMain( Window1, Normal )

-- code ends

new topic     » topic index » view message » categorize

2. Re: Win32Lib: making a "List Table"?

Hello,

>I think I would like to use a "List Table" in an app, (like a list box, but
>in table format to show association between items); when an item in one
>part
>of the table is selected, the whole line is too.

>Any suggestions?  (perhaps this is a candidate for a new control??)

Sounds like we need a grid control.

later,
Lewis Townsend
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

3. Re: Win32Lib: making a "List Table"?

On Tue, 1 Feb 2000 16:26:47 GMT, Lewis Townsend <keroltarr at HOTMAIL.COM>
wrote:

>Hello,
>
>>I think I would like to use a "List Table" in an app, (like a list box,
but
>>in table format to show association between items); when an item in one
>>part
>>of the table is selected, the whole line is too.
>
>>Any suggestions?  (perhaps this is a candidate for a new control??)
>
>Sounds like we need a grid control.
>


Oooh  ooooh ooooh! (waives hand wildly)  There is a great grid control out
there I just used to write a massive (30000 lines of code) scheduling
program for an east coast grocery-chain.  It is called XGrid, and you can
download a demo at http://www.green-tree.com.  Here's the catch   -  it's
an activeX control, so you have to write your program in another language.
Yet another lonely cry goes out for COM/ActiveX support in Eu3.0!  (Help me
out here people...)  BTW, that also counts as a less loney cry for (built-
in) object-oriented Euphoria...

Until Eu DOES support activeX controls, try looking into the listview
control.  It's not wrapped into win32lib, so you'll have to hack it in
yourself, but it does have an option to display gridlines in report mode,
which makes it do the same thing as in the example, but using just one
control.

Brian

new topic     » goto parent     » topic index » view message » categorize

4. Re: Win32Lib: making a "List Table"?

Hi again,

Also, I just remembered a project I did where I used tabstops in a listview
to create "columns" of text for connections, usernames, and IP addresses.
I don't think the company I did this for would like it if I posted the
source code for their server front-end on the 'net, but I cut out the
example and dumped in some sample records so you can see how I did it.  The
key is to create() a List object, and give it the style parameter #82
rather than 0.


-------------------------   BEGIN CODE ---------------------------------
-- tabstops example
without warning
include Win32lib.ew

constant WS_FIXEDFRAME = #4A0000
constant WS_PASSWORD = #20
--========================================================================
-- OBJECT DEFINITIONS
--========================================================================
-- WINDOWS
global constant MainWin =
    create(Window, "Server Console [Cheyenne 199.200.201.1]",
      0, 0, 0, 300, 600, WS_FIXEDFRAME )
--========================================================================
-- GROUP BOXES
global constant MainWinClientGroup =
    create(Group, "Client Info", MainWin, 2, 48, 300, 480, 0 )
--========================================================================
-- LIST BOXES
global constant MainWinClientListBox =          --#82 makes the listBox use
    create(List,"",MainWin, 10,100,282,392,#82) -- tabstops and be sorted!
--=========================================================================
-- STAT TEXTS
global constant MainWinStatText1 =
    create(LText,"Conn.",MainWin, 10, 82, 40, 16, 0)
global constant MainWinStatText2 =
    create(LText,"Username",MainWin, 60, 82, 80, 16, 0)
global constant MainWinStatText3 =
    create(LText,"IP Address",MainWin, 156, 82, 140, 16, 0)
--=========================================================================
procedure onOpenMainWin()

  integer x, y

  -- set up the MainWindow object
  setWindowBackColor(MainWin,rgb(192,192,192))
  setFont(MainWin,"MS Sans Serif",8,0)

  -- trap the mouse
  captureMouse(MainWin)
  setMousePointer(MainWin,AppStartingPointer)

  -- center MainWin on the user's screen (won't work with resolutions of <
  --  800x600)
  x=floor(c_func(xGetSystemMetrics,{SM_CXFULLSCREEN})/2)
  y=floor(c_func(xGetSystemMetrics,{SM_CYFULLSCREEN})/2)
  moveWindow(MainWin,x-155,y-300,310,600,1)

  -- set up the ListBox objects
  setFont(MainWinClientListBox,"MS Sans Serif",8,0)
  addItem(MainWinClientListBox,"002\ttstarns \t\t199.240.168.14")
  addItem(MainWinClientListBox,"015\tnphinney\t\t199.240.168.87")
  addItem(MainWinClientListBox,"004\tjjones  \t\t199.240.168.225")
  addItem(MainWinClientListBox,"013\tartmac  \t\t199.240.168.33")
  addItem(MainWinClientListBox,"005\tdgabriel\t\t199.240.168.28")
  addItem(MainWinClientListBox,"001\tbjackson\t\t199.240.168.52")
  addItem(MainWinClientListBox,"017\tdstemet \t\t199.240.168.11")
  addItem(MainWinClientListBox,"008\tjmiller \t\t199.240.168.38")
  addItem(MainWinClientListBox,"011\tjdawson \t\t199.240.168.73")
  addItem(MainWinClientListBox,"009\ttblake  \t\t199.240.168.215")
  addItem(MainWinClientListBox,"014\tmetropub\t\t199.240.168.35")
  addItem(MainWinClientListBox,"010\tsharden \t\t199.240.168.28")
  addItem(MainWinClientListBox,"003\ttgreer  \t\t199.240.168.221")
  addItem(MainWinClientListBox,"006\tjsellers\t\t199.240.168.72")
  addItem(MainWinClientListBox,"007\tmrandall\t\t199.240.168.13")
  addItem(MainWinClientListBox,"012\tcpotter \t\t199.240.168.151")
  addItem(MainWinClientListBox,"016\tkinkelaa\t\t199.240.168.41")
  addItem(MainWinClientListBox,"018\ttmcleod \t\t199.240.168.27")
  addItem(MainWinClientListBox,"019\tjwilliam\t\t199.240.168.89")
  addItem(MainWinClientListBox,"020\tbela    \t\t199.240.168.5")
  addItem(MainWinClientListBox,"021\tpi2     \t\t199.240.168.4")
  addItem(MainWinClientListBox,"022\tboulder \t\t199.240.168.2")
  addItem(MainWinClientListBox,"023\tkansa   \t\t199.240.168.9")


  -- return the mouse to normal
  releaseMouse()
  setMousePointer(MainWin,ArrowPointer)

end procedure
--========================================================================
-- EVENT HANDLERS
onOpen[MainWin] = routine_id("onOpenMainWin")
--========================================================================
-- WINMAIN
WinMain( MainWin, Normal )

-------------------------------END CODE------------------------------------

Enjoy!
Brian

new topic     » goto parent     » topic index » view message » categorize

5. Re: Win32Lib: making a "List Table"?

I dont know if anybody has wrapped the DataGrid control, but this is exactly
what you are looking for, and very versatile. Maybe someone could get round
to wrapping it, or inform us when it is likely to be wrapped?

Nick

----- Original Message -----
From: Dan B Moyer <DANMOYER at PRODIGY.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Tuesday, February 01, 2000 8:23 PM
Subject: Win32Lib: making a "List Table"?


> I think I would like to use a "List Table" in an app, (like a list box,
but
> in table format to show association between items); when an item in one
part
> of the table is selected, the whole line is too.
>
> I made a simple example, but I wonder if it couldn't be better.  My
concerns
> with it are:
> 1.  since I made it by just putting list boxes side by side, I don't know
> how well that "registration" works on systems with other video settings;
> it's *supposed* to look simply like a table, & does on my system;
> 2.  it "jerks" when items in it are selected, because the primary selected
> item responds to mouse button down, and the others don't respond until
mouse
> button goes up.
>
> Any suggestions?  (perhaps this is a candidate for a new control??)
>
> Dan Moyer
>
> -- code begins:
>
> --  code generated by Win32Lib IDE v0.8
> --  A LIST TABLE:
> --  information is displayed in table form, and selecting any item selects
> --  its associated parameters on same line of table
>
> include Win32Lib.ew
> without warning
>
> -----------------------------------------------------------------------
> --  Window Window1
> global constant Window1 = create( Window, "a List Table", 0, Default,
> Default, 780, 456+ 19, 0 )
> global constant List1 = create( List, "List1", Window1, 100, 60, 199, 120,
> 0 )
> global constant List2 = create( List, "List2", Window1, 300, 60, 200, 120,
> 0 )
> global constant List3 = create( List, "List3", Window1, 501, 60, 200, 120,
> 0 )
> global constant Label1  = create(CText, "Click on an item, and associated
> parameters will also be selected:", Window1, 100, 20, 550, 28, 0)
> --------------------------------------------------------------------------
> -- populate lists with stuff on open:
> procedure Window1_onOpen ()
>
> addItem(List1,"an item")
> addItem(List1,"another item")
> addItem(List2,"1st parameter")
> addItem(List2,"another 1st parameter")
> addItem(List3,"2nd parameter")
> addItem(List3,"another 2nd parameter")
>
> -- set top line in all lists selected if anything in at least one of them:
> if getCount(List1) > 0 or getCount(List2) > 0
>  or getCount(List3) > 0 then
>    setIndex(List1, 1)
>    setIndex(List2, 1)
>    setIndex(List3, 1)
> end if
> end procedure
> onOpen[Window1] = routine_id("Window1_onOpen")
>
> -----------------------------------------------
> -- when item in list1 is selected, things in other lists on same line
> -- are also selected
> procedure List1_onChange ()
> object result
> integer index
> index = getIndex(List1)
> if index> 0 then
>    setIndex(List2,index)
>    setIndex(List3,index)
> end if
> end procedure
> onChange[List1] = routine_id("List1_onChange")
>
> ------------------------------------------------------------------------
>
> WinMain( Window1, Normal )
>
> -- code ends
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: Win32Lib: making a "List Table"?

Brian Jackson <bjackson at 2FARGON.COM> wrote:

>Yet another lonely cry goes out for COM/ActiveX support in Eu3.0!  (Help me
>out here people...)  BTW, that also counts as a less loney cry for (built-
>in) object-oriented Euphoria...
>
>Until Eu DOES support activeX controls, try looking into the listview
>control.  It's not wrapped into win32lib, so you'll have to hack it in
>yourself, but it does have an option to display gridlines in report mode,
>which makes it do the same thing as in the example, but using just one
>control.
>
>Brian

I like the second idea much better. ActiveX is the single most virus prone
item that MS has ever been able to create. Why would Eu want to support
that. An interface to JAVA, JINI, CORBA would make a lot more sense.

Everett L.(Rett) Williams
rett at gvtc.com

new topic     » goto parent     » topic index » view message » categorize

7. Re: Win32Lib: making a "List Table"?

Nick Johnson wrote:

> I dont know if anybody has wrapped the DataGrid
> control, but this is exactly what you are looking
> for, and very versatile. Maybe someone could get round
> to wrapping it, or inform us when it is likely to be wrapped?

I haven't seen any DataGrid type of common control, so I don't know that it
can be wrapped. The ListView, on the other hand, really sounds like what's
being asked. That is a common control, and can be wrapped.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

8. Re: Win32Lib: making a "List Table"?

>Everett L.(Rett) Williams
>rett at gvtc.com
>
>I like the second idea much better. ActiveX is the single most virus prone
>item that MS has ever been able to create.

I'll take issue on that one.  Ever hear of this little thing called
a 'macro virus'?  Those are WordBasic/VisualBasic virii, not activeX.

>Why would Eu want to support that.

Because by supporting COM (activeX), Eu would come into the mainstream with
C/C++, VB, and all the other 4GL languages for the Wintel platform.  I for
one would actually *LIKE* to be able to embed Windows Media Player within
one of my applications.  I would like to have my users click on a SAVE
AS .DOC button in a win32Lib app, and make MS-Word save the document for
me. I'd like to see Dan (and everyone else) have access to grid controls.
Heck, one of my most profitable areas of expertise is taking old DOS apps
that were written in 1978, and rewriting them as windows apps that display
everything inside of the Internet Explorer activeX control, so that you can
use the apps at work, at home, or on the road.  Why WOULDN'T Eu want to
support that?  I personally find it very frustrating to see all these tools
out there for the taking, and not be able to use them...

>An interface to JAVA, JINI, CORBA would make a lot more sense.

I can't comment on CORBA or JINI since I'm not particularly familiar with
them, but JAVA?!!  I understand that JAVA is basically platform-
independent, but if you want to code in JAVA, code in JAVA - why use Eu
to "wrap" JAVA.  Oh yeah - because it's 8 times faster.

I guess the bottom line is that, like it or not, COM/activeX is a
*standard* for the serious WIN32 programmer.  It seems to me that Eu is
already at a cross-roads with the namespace and OOP issues, and activeX
seems like a logical extension of that line of thinking.  I suppose that
RDS (and the rest of the Eu community) will have to make some desicions on
what type of language Euphoria will become in the future.  I vote for OOP
and COM because with a little investment in learning classes, methods, and
structures, you get a HUGE return in the number of things you can
accomplish.  This helps keep Eu simple, but makes it extremely powerful,
too.

NOTE:
Although my opinions on this issue are very strong and I disagree with
Everett at every opportunity, this is *NOT* a flame.  I respect Everett's
opinions very much, and welcome a debate on this issue, whether anyone else
agrees with me or not.

Brian

new topic     » goto parent     » topic index » view message » categorize

9. Re: Win32Lib: making a "List Table"?

----- Original Message -----
From: Brian Jackson <bjackson at 2FARGON.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Tuesday, February 01, 2000 2:57 PM
Subject: Re: Win32Lib: making a "List Table"?


> >Everett L.(Rett) Williams
> >rett at gvtc.com
> >
> >I like the second idea much better. ActiveX is the single most virus
prone
> >item that MS has ever been able to create.
>
> I'll take issue on that one.  Ever hear of this little thing called
> a 'macro virus'?  Those are WordBasic/VisualBasic virii, not activeX.
>
> >Why would Eu want to support that.
>
> Because by supporting COM (activeX), Eu would come into the mainstream
with
> C/C++, VB, and all the other 4GL languages for the Wintel platform.  I for
> one would actually *LIKE* to be able to embed Windows Media Player within
> one of my applications.  I would like to have my users click on a SAVE
> AS .DOC button in a win32Lib app, and make MS-Word save the document for
> me. I'd like to see Dan (and everyone else) have access to grid controls.
> Heck, one of my most profitable areas of expertise is taking old DOS apps
> that were written in 1978, and rewriting them as windows apps that display
> everything inside of the Internet Explorer activeX control, so that you
can
> use the apps at work, at home, or on the road.  Why WOULDN'T Eu want to
> support that?  I personally find it very frustrating to see all these
tools
> out there for the taking, and not be able to use them...
>
> >An interface to JAVA, JINI, CORBA would make a lot more sense.
>
> I can't comment on CORBA or JINI since I'm not particularly familiar with
> them, but JAVA?!!  I understand that JAVA is basically platform-
> independent, but if you want to code in JAVA, code in JAVA - why use Eu
> to "wrap" JAVA.  Oh yeah - because it's 8 times faster.
>
> I guess the bottom line is that, like it or not, COM/activeX is a
> *standard* for the serious WIN32 programmer.  It seems to me that Eu is
> already at a cross-roads with the namespace and OOP issues, and activeX
> seems like a logical extension of that line of thinking.  I suppose that
> RDS (and the rest of the Eu community) will have to make some desicions on
> what type of language Euphoria will become in the future.  I vote for OOP
> and COM because with a little investment in learning classes, methods, and
> structures, you get a HUGE return in the number of things you can
> accomplish.  This helps keep Eu simple, but makes it extremely powerful,
> too.
>
> NOTE:
> Although my opinions on this issue are very strong and I disagree with
> Everett at every opportunity, this is *NOT* a flame.  I respect Everett's
> opinions very much, and welcome a debate on this issue, whether anyone
else
> agrees with me or not.

I have ActiveX turned off in IE5 and i don't run active desktop. Both caused
me more headaches then they are worth. Both have crashed the puter,
destroyed files, rearranged my desktop, etc.. If David can call the same
functions in win32lib that activeX calls, but in a way that won't be a
microsoft pain in the a$$ like activeX, that would be useful as a simulation
of activeX but without the problems. Just my opinion.

Kat

new topic     » goto parent     » topic index » view message » categorize

10. Re: Win32Lib: making a "List Table"?

> >Everett L.(Rett) Williams
> >rett at gvtc.com
> >
> >I like the second idea much better. ActiveX is the single most virus
prone
> >item that MS has ever been able to create.
>
> I'll take issue on that one.  Ever hear of this little thing called
> a 'macro virus'?  Those are WordBasic/VisualBasic virii, not activeX.

I think what was actually meant was that ActiveX is trojan prone (often
mistaken as virus), and that it is - it's dead easy to write an ActiveX
trojan, then get a user to download it, and theres no way to know what it
does until it's downloaded. However, trojan horse problems are not an issue
within an App, as the author would use activex controls that do what they
need them to do, not downloading an unknown one off the internet.

Nick

new topic     » goto parent     » topic index » view message » categorize

11. Re: Win32Lib: making a "List Table"?

Brian,

That is a nifty looking list box!  I think I *could* make it work for me,
but it looks like I'd have to "parse" any given line in it to get a
particular column's info OUT, and copy & rebuild a line to put individual
column info INTO it, & my way of putting a series of list boxes next to each
other lets me easily act to write or read to whichever column/ListBox I
want.

Without some kind of "ListTable" control, looks like it is a choice between
your more easily constructed single list, with more difficult column info
input & extraction, and my more difficult to construct series of list boxes
with easier input & extraction of column info.  I may end up using yours.
Thanks.

Dan Moyer




-----Original Message-----


>Hi again,
>
>Also, I just remembered a project I did where I used tabstops in a listview
>to create "columns" of text for connections, usernames, and IP addresses.
>I don't think the company I did this for would like it if I posted the
>source code for their server front-end on the 'net, but I cut out the
>example and dumped in some sample records so you can see how I did it.  The
>key is to create() a List object, and give it the style parameter #82
>rather than 0.
>
>
>-------------------------   BEGIN CODE ---------------------------------
>-- tabstops example
>without warning
>include Win32lib.ew
>
>constant WS_FIXEDFRAME = #4A0000
>constant WS_PASSWORD = #20
>--========================================================================
>-- OBJECT DEFINITIONS
>--========================================================================
>-- WINDOWS
>global constant MainWin =
>    create(Window, "Server Console [Cheyenne 199.200.201.1]",
>      0, 0, 0, 300, 600, WS_FIXEDFRAME )
>--========================================================================
>-- GROUP BOXES
>global constant MainWinClientGroup =
>    create(Group, "Client Info", MainWin, 2, 48, 300, 480, 0 )
>--========================================================================
>-- LIST BOXES
>global constant MainWinClientListBox =          --#82 makes the listBox use
>    create(List,"",MainWin, 10,100,282,392,#82) -- tabstops and be sorted!
>--=========================================================================
>-- STAT TEXTS
>global constant MainWinStatText1 =
>    create(LText,"Conn.",MainWin, 10, 82, 40, 16, 0)
>global constant MainWinStatText2 =
>    create(LText,"Username",MainWin, 60, 82, 80, 16, 0)
>global constant MainWinStatText3 =
>    create(LText,"IP Address",MainWin, 156, 82, 140, 16, 0)
>--=========================================================================
>procedure onOpenMainWin()
>
>  integer x, y
>
>  -- set up the MainWindow object
>  setWindowBackColor(MainWin,rgb(192,192,192))
>  setFont(MainWin,"MS Sans Serif",8,0)
>
>  -- trap the mouse
>  captureMouse(MainWin)
>  setMousePointer(MainWin,AppStartingPointer)
>
>  -- center MainWin on the user's screen (won't work with resolutions of <
>  --  800x600)
>  x=floor(c_func(xGetSystemMetrics,{SM_CXFULLSCREEN})/2)
>  y=floor(c_func(xGetSystemMetrics,{SM_CYFULLSCREEN})/2)
>  moveWindow(MainWin,x-155,y-300,310,600,1)
>
>  -- set up the ListBox objects
>  setFont(MainWinClientListBox,"MS Sans Serif",8,0)
>  addItem(MainWinClientListBox,"002\ttstarns \t\t199.240.168.14")
>  addItem(MainWinClientListBox,"015\tnphinney\t\t199.240.168.87")
>  addItem(MainWinClientListBox,"004\tjjones  \t\t199.240.168.225")
>  addItem(MainWinClientListBox,"013\tartmac  \t\t199.240.168.33")
>  addItem(MainWinClientListBox,"005\tdgabriel\t\t199.240.168.28")
>  addItem(MainWinClientListBox,"001\tbjackson\t\t199.240.168.52")
>  addItem(MainWinClientListBox,"017\tdstemet \t\t199.240.168.11")
>  addItem(MainWinClientListBox,"008\tjmiller \t\t199.240.168.38")
>  addItem(MainWinClientListBox,"011\tjdawson \t\t199.240.168.73")
>  addItem(MainWinClientListBox,"009\ttblake  \t\t199.240.168.215")
>  addItem(MainWinClientListBox,"014\tmetropub\t\t199.240.168.35")
>  addItem(MainWinClientListBox,"010\tsharden \t\t199.240.168.28")
>  addItem(MainWinClientListBox,"003\ttgreer  \t\t199.240.168.221")
>  addItem(MainWinClientListBox,"006\tjsellers\t\t199.240.168.72")
>  addItem(MainWinClientListBox,"007\tmrandall\t\t199.240.168.13")
>  addItem(MainWinClientListBox,"012\tcpotter \t\t199.240.168.151")
>  addItem(MainWinClientListBox,"016\tkinkelaa\t\t199.240.168.41")
>  addItem(MainWinClientListBox,"018\ttmcleod \t\t199.240.168.27")
>  addItem(MainWinClientListBox,"019\tjwilliam\t\t199.240.168.89")
>  addItem(MainWinClientListBox,"020\tbela    \t\t199.240.168.5")
>  addItem(MainWinClientListBox,"021\tpi2     \t\t199.240.168.4")
>  addItem(MainWinClientListBox,"022\tboulder \t\t199.240.168.2")
>  addItem(MainWinClientListBox,"023\tkansa   \t\t199.240.168.9")
>
>
>  -- return the mouse to normal
>  releaseMouse()
>  setMousePointer(MainWin,ArrowPointer)
>
>end procedure
>--========================================================================
>-- EVENT HANDLERS
>onOpen[MainWin] = routine_id("onOpenMainWin")
>--========================================================================
>-- WINMAIN
>WinMain( MainWin, Normal )
>
>-------------------------------END CODE------------------------------------
>
>Enjoy!
>Brian

new topic     » goto parent     » topic index » view message » categorize

12. Re: Win32Lib: making a "List Table"?

On Wed, 2 Feb 2000 04:44:16 -0800, Dan B Moyer <DANMOYER at PRODIGY.NET> wrote:

>Brian,
>
>That is a nifty looking list box!  I think I *could* make it work for me,
>but it looks like I'd have to "parse" any given line in it to get a
>particular column's info OUT, and copy & rebuild a line to put individual
>column info INTO it, & my way of putting a series of list boxes next to
each
>other lets me easily act to write or read to whichever column/ListBox I
>want.
>
>Without some kind of "ListTable" control, looks like it is a choice between
>your more easily constructed single list, with more difficult column info
>input & extraction, and my more difficult to construct series of list boxes
>with easier input & extraction of column info.  I may end up using yours.
>Thanks.
>
>Dan Moyer

Dan,

It's actually pretty easy to get at the data.  In my example, try something
like this:

----------------------------  UNTESTED CODE ------------------------------
function parseListData(sequence tabbedText)
  -- takes "x\ty\tz" and returns {x,y,z}

  integer x
  sequence returnData

  returnData = ""

  x = match("\t", tabbedText)
  while x do
    returnData = append(returnData, tabbedText[1..x-1])
    tabbedText = tabbedText[x + 1..length(tabbedText)]
    x = match("\t", tabbedText)
  end while

  return returnData
end function

new topic     » goto parent     » topic index » view message » categorize

13. Re: Win32Lib: making a "List Table"?

Bryan,

Is there a style constant to make a list UNsorted but use tabstops?

Thanks,
Judith Evans

new topic     » goto parent     » topic index » view message » categorize

14. Re: Win32Lib: making a "List Table"?

On Thu, 3 Feb 2000 04:53:40 -0500, Judith Evans <camping at FLASH.NET> wrote:

>Bryan,
>
>Is there a style constant to make a list UNsorted but use tabstops?
>
>Thanks,
>Judith Evans

Yes.  Use #80 instead of #82.

Brian

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu