Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Example #2

Open
rafathefull opened this issue Aug 3, 2016 · 0 comments
Open

New Example #2

rafathefull opened this issue Aug 3, 2016 · 0 comments

Comments

@rafathefull
Copy link
Contributor

Hi, I create this example ;


init procedure my_init()
    memvar gtk
    public gtk := hbgi_import("Gtk")
return

function Main()
    local win, button, box, image
    memvar gtk

    gtk:init( hb_aParams() )

    win := gtk:Window:new( gtk:WindowType:TOPLEVEL )
    win:Set_Position( gtk:WindowPosition:CENTER )
    win:connect('delete-event', {|| gtk:main_quit() })

    box := gtk:vbox:new( .f., 0 )
    win:add( box )

    Image := gtk:image:new_from_file( "harbour-logo.jpg" )
    box:add( Image )

    button := gtk:Button:new_with_label(E"Click me\nRight now")
    button:connect('clicked', {|| gtk:main_quit() })
    box:add(button)

    win:show_all()
    gtk:main()
    win := NIL
    button := NIL

return 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant