mail-archives/gtk-sharp-list/2008-June/008705.html

104 строки
4.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] I really need some sort of tutorial
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20I%20really%20need%20some%20sort%20of%20tutorial&In-Reply-To=4844004A.7080702%40quarter-flash.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="008704.html">
<LINK REL="Next" HREF="008708.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] I really need some sort of tutorial</H1>
<B>Adam Tauno Williams</B>
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20I%20really%20need%20some%20sort%20of%20tutorial&In-Reply-To=4844004A.7080702%40quarter-flash.com"
TITLE="[Gtk-sharp-list] I really need some sort of tutorial">adam at morrison-ind.com
</A><BR>
<I>Mon Jun 2 10:35:37 EDT 2008</I>
<P><UL>
<LI>Previous message: <A HREF="008704.html">[Gtk-sharp-list] I really need some sort of tutorial
</A></li>
<LI>Next message: <A HREF="008708.html">[Gtk-sharp-list] I really need some sort of tutorial
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#8705">[ date ]</a>
<a href="thread.html#8705">[ thread ]</a>
<a href="subject.html#8705">[ subject ]</a>
<a href="author.html#8705">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>&gt;<i> on interactive applications.
</I>&gt;<i> I don't have any previous experience with using GTK in C or C++.
</I>
I came to GTK# from the same place so don't feel too bad. Last time I'd
done any GUI programming was with Borland's OWL toolkit on Windows For
Workgroups. :)
&gt;<i> Basically, there are a lot of fields (you can see an image at
</I>&gt;<i> <A HREF="http://quarter-flash.com/powerball.png">http://quarter-flash.com/powerball.png</A>) and the [Play] button kicks
</I>&gt;<i> off either a thread or just starts the loop that starts running the
</I>&gt;<i> program.
</I>&gt;<i> Because the actual code for updating fields is part of a separate
</I>&gt;<i> class (separate from the GUI) I am not seeing the UI update at all.
</I>
I assume your Window / Dialog with the form fields is a class? Just
expose the fields as properties might be the simplest way.
...
public string Jackpot { set { jackpot.Text = value; } }
...
That should update the value in the field. Have your command class call
that method of your Window/Dialog/Form class.
&gt;<i> I have seen a lot of very simple tutorials on how to make a GUI
</I>&gt;<i> responsive, but I'm not seeing two way communications happening. That
</I>&gt;<i> is, I need to grab values from the text entry fields, process them,
</I>&gt;<i> and then update the text entry fields with the new values.
</I>&gt;<i> I'm most likely just being very dense here, and I'm finding it very
</I>&gt;<i> difficult to wrap my mind around how this works. I think I understand
</I>&gt;<i> that if the user was editing the fields I could attach callbacks for
</I>&gt;<i> the fields, but since it's the program editing the fields I'm just not
</I>&gt;<i> making the connection (literally :) in how this works.
</I>
You can either update the field whenever the value is changed by the
calculation or call a Timer to refresh the values from the command
class.
&gt;<i> The interface was designed in Glade and perhaps there are some
</I>&gt;<i> properties there that I've set incorrectly that are hindering my attempts.
</I>&gt;<i> Any pointers/references that you can point me to would be *greatly*
</I>&gt;<i> appreciated.
</I>--
Consonance: an Open Source .NET OpenGroupware client.
Contact:<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">awilliam at whitemiceconsulting.com</A> <A HREF="http://freshmeat.net/projects/consonance/">http://freshmeat.net/projects/consonance/</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="008704.html">[Gtk-sharp-list] I really need some sort of tutorial
</A></li>
<LI>Next message: <A HREF="008708.html">[Gtk-sharp-list] I really need some sort of tutorial
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#8705">[ date ]</a>
<a href="thread.html#8705">[ thread ]</a>
<a href="subject.html#8705">[ subject ]</a>
<a href="author.html#8705">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
mailing list</a><br>
</body></html>