[Gtk-sharp-list] Q: How to set x/y position with fixed widget?

Stephan Eberle hawke@deltacity.org
Mon, 16 Aug 2004 23:06:33 +0200


This is a cryptographically signed message in MIME format.

--------------ms090107010606050601030208
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi.

I'm just playing around a bit and there's a question I'd like to ask:

How can I position a control on a fixed widget?
I have this code so far:

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

    Gtk.Application.Init()

        Dim wnd As New Gtk.Window(Gtk.WindowType.Toplevel)
        AddHandler wnd.DeleteEvent, AddressOf OnWindowDeleteEvent
        With wnd
            .SetFlag(Gtk.WidgetFlags.DoubleBuffered)
            .SetPosition(Gtk.WindowPosition.Center)
            .SetDefaultIconFromFile("app.ico")
            .SetDefaultSize(420, 260)
            .SetSizeRequest(420, 260)
            .Title = "Core Anmeldung"
            .Resizable = False
        End With


        Dim Fra As New Gtk.Fixed
        Fra.DoubleBuffered = True
        Fra.Show()

        Dim btn As New Gtk.Button
        btn.SetSizeRequest(70, 26)

        btn.Label = "Ok!"
        btn.Show()

        Fra.Add(btn)

        wnd.Add(Fra)

        wnd.Show()
        Gtk.Application.Run()
------------------------

Very simple. It's just for me to get an understanding of how gtk# works...
What am I missing?

And yes, I want to use fixed widgets for this one! :)

Thank's for any help...

Regards,
Stevie

--------------ms090107010606050601030208
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIII8TCC
AtMwggI8oAMCAQICAwxjDjANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE
ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv
bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDQwNTI2MTgyODU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