- Code: Select all
@args -pkg:gtk-sharp-2.0
use Gtk
class ToggleButtons
def main
ToggleButtons().run
def onDeleteEvent(obj, args as DeleteEventArgs)
Application.quit
def onExitButtonEvent(obj, args as EventArgs)
Application.quit
def run
Application.init
window = Window('Toggle Buttons')
listen window.deleteEvent, ref .onDeleteEvent
window.borderWidth = 0
box1 = VBox(false, 10)
window.add(box1)
box1.show
box2 = VBox(false, 10)
box2.borderWidth = 10
box1.packStart(box2, true, true, 0)
box2.show
toggleButt = ToggleButton('Button 1')
box2.packStart(toggleButt, true, true, 0)
toggleButt.show
toggleButt = ToggleButton('Button 2')
toggleButt.active = true
box2.packStart(toggleButt, true, true, 0)
toggleButt.show
separator = HSeparator()
box1.packStart(separator, false, true, 0)
separator.show
box3 = VBox(false, 10)
box3.borderWidth = 10
box1.packStart(box3, false, true, 0)
button = Button('Close')
listen button.clicked, ref .onExitButtonEvent
box3.packStart(button, true, true, 0)
button.canDefault = true
button.grabDefault
button.show
window.showAll
Application.run
Forums
This gtk code is definetly running.
6 posts
• Page 1 of 1
This gtk code is definetly running.
- Achletomeniak
Re: This gtk code is definetly running.
Hi again ,
i can start the compiled gtk.exe also on LINUX PC.
mono gtk.exe
and the widget will start.
the same as i type cobra gtk.cobra
What does that mean ?
Is this a real "check out" for the exe IF the .exe is running on windows by a double klick ?
WBR
Ach
i can start the compiled gtk.exe also on LINUX PC.
mono gtk.exe
and the widget will start.
the same as i type cobra gtk.cobra
What does that mean ?
Is this a real "check out" for the exe IF the .exe is running on windows by a double klick ?
WBR
Ach
- Achletomeniak
Re: This gtk code is definetly running.
"cobra gtk.cobra" will always compile to an .exe and then run it.
"mono gtk.exe" just runs the .exe file that is already there.
"cobra --compile-if-needed gtk.cobra" will compare the timestamp to the .exe and only compile if the .cobra is newer than the .exe.
You can also abbreviate that as "cobra -cin gtk.cobra"
See "cobra --help" for more info.
"mono gtk.exe" just runs the .exe file that is already there.
"cobra --compile-if-needed gtk.cobra" will compare the timestamp to the .exe and only compile if the .cobra is newer than the .exe.
You can also abbreviate that as "cobra -cin gtk.cobra"
See "cobra --help" for more info.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: This gtk code is definetly running.
Yeah.
- Attachments
-
- Take advantage of cobra.
- cobra_wallpaper_by_ljdesigner-d6sjrfi2.jpg (287.39 KiB) Viewed 92125 times
- Achletomeniak
Re: This gtk code is definetly running.
Interesting design. You might want to post that as a separate thread called "Cobra Wallpaper"
- Charles
- Posts: 2515
- Location: Los Angeles, CA
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 50 guests