1. New to the list!

Greetings! I've been following the list for a couple
of months, and using Eu for about a year.
I am a programmer working with flat files, and started
using Eu for specialized reports.
I know my bosses would prefer me to use C/C++, but
when I show them
a program that I can write in an hour, that runs
almost as fast as C,
they are impressed. (So I guess I can say that I get
paid for writing in Eu!)

Anyway, I've got a couple problems in the following
Win32Lib program:
1) I can't get the drop-down list (on a second, modal
window) populated
2) How do I get the rich edit to resize when the
window is resized?

Any help would be greatly appreciated! Thanx!

--------------------
-- beginning of code
include win32lib.ew

constant Win1 = create( Window, "Win1", 0, Default,
Default, 600, 400, 0 )
constant Btn1 = create( PushButton, "Open Win2", Win1,
10, 10, 200, 50, 0 )
constant Ed1  = create( RichEdit, "", Win1, 0, 70,
600, 330, 0 )
constant Win2 = create( Window, "Win2", Win1, Default,
Default, 400, 250,
                             or_all({WS_DLGFRAME,
WS_SYSMENU}))
constant Btn2 = create( PushButton, "Close Win2",
Win2, 10, 10, 200, 50, 0 )
constant DDL1 = create( DropDownList, "", Win2, 10,
80, 200, 25, 0 )

addItem( DDL1, "one" )
addItem( DDL1, "two" )
addItem( DDL1, "three" )
addItem( DDL1, "four" )

global procedure onClick_Btn1()
  openWindow( Win2, Modal )
end procedure
onClick[Btn1] = routine_id( "onClick_Btn1" )

global procedure onClick_Btn2()
  closeWindow( Win2 )
end procedure
onClick[Btn2] = routine_id( "onClick_Btn2" )


WinMain( Win1, Normal )
-- end of code
--------------

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

new topic     » topic index » view message » categorize

2. Re: New to the list!

Michael Thompson wrote:

> I can't get the drop-down list (on a second, modal window) populated

Actually, it *is* populated; press the down arrow and you can scroll though
the values.

This is a common problem with the combo -  you need to allocate the height
(cy) value large enough for the *list*, not just the text area. Something
like:

  constant DDL1 = create( DropDownList, "", Win2, 10, 80, 200, 25*8, 0 )


> How do I get the rich edit to resize when the window is resized?

You can trap the onResize event. Take a look at how the Generic demo does
it.

Hope this helps!

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu