1. Win32Lib lists
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> Jun 13, 2000
- 385 views
Hello David (and other Win32Lib gurus): I recently broke down and decided to learn Win32Lib. I discovered that it isn't nearly as hard as I thought. There's just a lot of routine names to memorize. I am currently working on a windows program that I once did in VEL: Decision Helper. In the process I have learned that the onChange event doesn't act the way I expected it to concerning lists. It seems that an index change is the only thing that triggers it. Adding an item to the list doesn't. Is this a bug? Here is an example program that demonstrates what I'm talking about: ---------------------------- include win32lib.ew without warning constant Win = create ( Window, "List change event test program", 0, 100, 100, 200, 300, 0 ), text = create ( EditText, "Hasn't worked yet...", Win, 0,0, 100,25, 0 ), button = create ( DefPushButton, "Text to List", Win, 105,0, 85,25, 0 ), list = create ( List, "", Win, 0,30, 190,245, 0 ) procedure onClick_button () addItem (list, getText (text)) end procedure onClick [button] = routine_id ("onClick_button") procedure onChange_List () setText (Win, "It worked!") end procedure onChange [list] = routine_id ("onChange_List") WinMain (Win, Normal) ------------------------------------ later, Lewis Townsend . __ _____ __ __ __ __ _____ . /\ \ /\ \|\ \ /\ \ /\ \ /\ \ /\ \ . / \_\ / \____\ \_\/ \_\/ \_\/ \_\/ \____\ . / / / / / ___/ | | / | / / / /\ / __ \ . / / / / / /_\ | | | / | / / / /\_\/ /_ \/ ./ / /\ / / ___/ | | |/ | / / / /\ \ \__ \ .\ / /__\\ / /__\ \ | /| |/ /\ / / \/\_\/ / . \/_____/ \/_____/ \|___/\|___/ \/_/ \_____/ keroltarr at hotmail.com http://geocities.com/keroltarr/ ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
2. Re: Win32Lib lists
- Posted by David Cuny <dcuny at LANSET.COM> Jun 12, 2000
- 379 views
Lewis Townsend wrote: > I discovered that [Win32Lib] isn't nearly as hard as I thought. Thanks. > It seems that an index change [on a list] is the only > thing that triggers [an onChange event]. Adding an > item to the list doesn't. Is this a bug? No, it's a feature. It's supposed to indicate that a list _selection_ has changed, not that the actual contents of list list has changed. -- David Cuny