1. Create window? How?

How do I create a window whith buttons scrollers and so on?

new topic     » topic index » view message » categorize

2. Re: Create window? How?

gunnar wrote:
> 
> How do I create a window whith buttons scrollers and so on?
> 
If you're using EuGTK, it's easy:

atom win, btn

win = window("Title goes here")
btn = button("Push me!")
addto(win,btn)
show(win)
main()

If you're using Win32Lib, then get Judith's IDE, and drop a button 
where you want it on the window.

Both Win32Lib and EuGTK come with short example programs using each of the
controls,
including scrolled windows, sliders, etc. 

Without a library such as Win32Lib or EuGTK, creating a Windows window 
takes about 100 lines of code.

Irv

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

3. Re: Create window? How?

irv mullins wrote:
> 
> gunnar wrote:
> > 
> > How do I create a window whith buttons scrollers and so on?
> > 
> If you're using EuGTK, it's easy:
> 
> atom win, btn
> 
> win = window("Title goes here")
> btn = button("Push me!")
> addto(win,btn)
> show(win)
> main()
> 
> If you're using Win32Lib, 

without the IDE the above could be coded ...

<code>
include win32lib.ew
createForm({"Window, Title goes here",
            "Button, Push me!"})
include w32start.ew
</eucode>
{{{


>then get Judith's IDE, and drop a button 
> where you want it on the window.
> 
> Both Win32Lib and EuGTK come with short example programs using each of the
> controls,
> 
> including scrolled windows, sliders, etc. 
> 
> Without a library such as Win32Lib or EuGTK, creating a Windows window 
> takes about 100 lines of code.

And there are a few other libraries in the archive that help coders
write Windows programs.

-- 
Derek Parnell
Melbourne, Australia

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

4. Re: Create window? How?

Ya, Derek, that new scriptable interface is nice, but I still stick
with the old, code-it-yourself stuff.

include Win32Lib.ew

constant    Main = create( Window, "My Window", 0, Default, Default,
640, 480, 0 )
constant    Btn1 = create( PushButton, "Click Me", Main, 10, 10, 90, 30, 0 )

procedure Btn1_Click( integer pSelf, integer pEvent, sequence pParams )

    VOID = message_box( "You clicked me!", "My Window", MB_OK )

end procedure
setHandler( Btn1, w32HClick, routine_id("Btn1_Click") )

WinMain( Main, Normal )


On Mon, 04 Oct 2004 14:45:49 -0700, Derek Parnell
<guest at rapideuphoria.com> wrote:
> 
> posted by: Derek Parnell <ddparnell at bigpond.com>
> 
> irv mullins wrote:
> >
> > gunnar wrote:
> > >
> > > How do I create a window whith buttons scrollers and so on?
> > >
> > If you're using EuGTK, it's easy:
> >
> > atom win, btn
> >
> > win = window("Title goes here")
> > btn = button("Push me!")
> > addto(win,btn)
> > show(win)
> > main()
> >
> > If you're using Win32Lib,
> 
> without the IDE the above could be coded ...
> 
> <code>
> include win32lib.ew
> createForm({"Window, Title goes here",
>            "Button, Push me!"})
> include w32start.ew
> </eucode>
{{{

> 
> >then get Judith's IDE, and drop a button
> > where you want it on the window.
> >
> > Both Win32Lib and EuGTK come with short example programs using each of the
> > controls,
> >
> > including scrolled windows, sliders, etc.
> >
> > Without a library such as Win32Lib or EuGTK, creating a Windows window
> > takes about 100 lines of code.
> 
> And there are a few other libraries in the archive that help coders
> write Windows programs.
> 
> --
> Derek Parnell
> Melbourne, Australia
> 
> 
> 
> 
>

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

5. Re: Create window? How?

Greg Haberek wrote:
> 
> Ya, Derek, that new scriptable interface is nice, but I still stick
> with the old, code-it-yourself stuff.
>

Yeah, I understand. What I wanted to do was enable people to code 
with the tools that suits them and their purposes. That's why win32lib
provides the coder with a number of different ways to build windows.

In the example I gave to this thread I wanted to show (as Irv did too), 
the dramatic difference that can librarys can provide, show I showed
the smallest working example of a buttoned window. Your example is 
perfectly sound too and thanks for providing an alternative.

Some people enjoy coding Windows programs using the low-level API
calls too. I believe that there is a nice example in the DEMO 
folder that comes with Euphoria. It weighs in a 254 lines and doesn't
even have a button!

You should see the new userInput() command that I've got coming in
the next version blink

-- 
Derek Parnell
Melbourne, Australia

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

6. Re: Create window? How?

Derek Parnell wrote:
<snip>
> Some people enjoy coding Windows programs using the low-level API
> calls too. 
<snip>

We're just masochistic.


> Derek Parnell
> Melbourne, Australia
>

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

7. Re: Create window? How?

scrolled windows.....now that's something i haven't been able to figure
out........i can add the scroll bar...but i can't figure out how to make it
scroll when you move the scrollbar....
*hangs her head in defeat*

Michelle Rogers
----- Original Message ----- 
From: "irv mullins" <guest at RapidEuphoria.com>
To: <EUforum at topica.com>
Sent: Monday, October 04, 2004 4:23 PM
Subject: Re: Create window? How?


>
>
> posted by: irv mullins <irvm at ellijay.com>
>
> gunnar wrote:
> >
> > How do I create a window whith buttons scrollers and so on?
> >
> If you're using EuGTK, it's easy:
>
> atom win, btn
>
> win = window("Title goes here")
> btn = button("Push me!")
> addto(win,btn)
> show(win)
> main()
>
> If you're using Win32Lib, then get Judith's IDE, and drop a button
> where you want it on the window.
>
> Both Win32Lib and EuGTK come with short example programs using each of the
controls,
> including scrolled windows, sliders, etc.
>
> Without a library such as Win32Lib or EuGTK, creating a Windows window
> takes about 100 lines of code.
>
> Irv
>
>
>
>

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

8. Re: Create window? How?

Michelle Rogers wrote:
> 
> scrolled windows.....now that's something i haven't been able to figure
> out........i can add the scroll bar...but i can't figure out how to make it
> scroll when you move the scrollbar....
> *hangs her head in defeat*

When you say "how to make it scroll", what exactly are you trying to 
scroll? 

The normal way is to trap the scroll event and then adjust the display
accordingly. In other words, the scrollbar doesn't *cause* your stuff
to move, it just tells your program that the user would like to move
your stuff, but you still have to do the moving.

-- 
Derek Parnell
Melbourne, Australia

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

9. Re: Create window? How?

------=_Part_31_30356900.1097130203732
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Michelle -
    I think this is what you're looking for. I whipped up a little
demo with a Window inside a Window that's bigger than its parent, and
moves inside the parent using the scroll bars. I've attached it to
this message.

Derek -
    Maybe you should include this in the Win32Lib demos? That'd be
great. Thanks.

~Greg


On Wed, 06 Oct 2004 19:56:06 -0700, Derek Parnell
<guest at rapideuphoria.com> wrote:
> 
> posted by: Derek Parnell <ddparnell at bigpond.com>
> 
> Michelle Rogers wrote:
> >
> > scrolled windows.....now that's something i haven't been able to figure
> > out........i can add the scroll bar...but i can't figure out how to make it
> > scroll when you move the scrollbar....
> > *hangs her head in defeat*
> 
> When you say "how to make it scroll", what exactly are you trying to
> scroll?
> 
> The normal way is to trap the scroll event and then adjust the display
> accordingly. In other words, the scrollbar doesn't *cause* your stuff
> to move, it just tells your program that the user would like to move
> your stuff, but you still have to do the moving.
> 
> --
> Derek Parnell
> Melbourne, Australia
> 
> 
> 
> 
> 

------=_Part_31_30356900.1097130203732
Content-Type: application/octet-stream; name="scrollwin.exw"

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

10. Re: Create window? How?

Greg Haberek wrote:

> 
> Derek -
>     Maybe you should include this in the Win32Lib demos? That'd be
> great. Thanks.

I don't get attachments using the Web interface so can you email
me the demo program? 

-- 
Derek Parnell
Melbourne, Australia

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

Search



Quick Links

User menu

Not signed in.

Misc Menu