Re: Drawing in a winform using Gtk C# in Xamarin Studio

RoboPi <[email protected]> Tue, 7 Jul 2015 09:42:06 -0700 (PDT)
Newsgroups gmane.comp.gnome.winforms
Message-ID <[email protected]>
--===============0102066843==
Content-Type: multipart/alternative; 
	boundary="----=_Part_45693_995325886.1436287326262"

------=_Part_45693_995325886.1436287326262
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thanks for the quick reply.=C2=A0 Unfortunately I'm new to all of this and =
I don't know what I'm doing so I'll try to explain
I'm running Windows 7.I downloaded Monodevelop Xamarin StudioWhen I start a=
 project I choose New SolutionFrom there I chose .NET and Gtk# 2.0 ProjectI=
 then select MainWindow.cs opened with Window Designer
I get a form to design and create code for the objects I place on the form.=
=20
When I run the program I get a "Window" that contains all my buttons, etc.=
=20

So that's where I'm at.=C2=A0=20

I've placed a "DrawingArea" object (or widget?) from the toolbox onto the f=
orm.=20

Now I would like to draw to that drawing area.=20

So I need to find some documentation or tutorials on how to do that.=20

That's where I'm at.=20

So what am I using here?=C2=A0 Is this a Gtk C# window?=C2=A0=C2=A0 Or a Wi=
nform?
And can I use a standard Windows form in this studio?=C2=A0 I used to have =
Microsoft C# studio and I could draw to a windows forms pretty easily.=C2=
=A0 But it doesn't seem to work the same in the Monodevelop Xamarin studio.=
=20

I just need to get past this graphics problem and I can get on with writing=
 my code to draw the simulations I want to program.=20

I just can't figure out how to draw to the "DrawingArea" object, or widget?=
=20
I've been looking for a tutorial on how to do that and I couldn't find one.=
=20

Thanks=20
     From: Stifu [via Mono] <[email protected]>
 To: RoboPi <[email protected]>=20
 Sent: Tuesday, July 7, 2015 12:09 PM
 Subject: Re: Drawing in a winform using Gtk C# in Xamarin Studio
  =20
 Hello,

You should either use WinForms or GTK#, not both.
If you want to use WinForms, then you should draw using GDI+, the same way =
you would in .NET.
If you want to use GTK#, then you should draw using GDK (http://docs.go-mon=
o.com/?link=3DT%3aGdk.Pixbuf).


RoboPi wroteHello,

I'm looking for help or tutorials on how to draw to a drawingarea on a Wind=
ows Form using C# in Xamarin Studio. =C2=A0I just need to draw simple shape=
s, line, rectangles, circles, and be able to fill them in with color.=20

A simple sample code would be great.

I haven't been able to find anything on YouTube or Google.=20
Any help will be greatly appreciated.
Thank you,
James
=20
=20
   If you reply to this email, your message will be added to the discussion=
 below: http://mono.1490590.n4.nabble.com/Drawing-in-a-winform-using-Gtk-C-=
in-Xamarin-Studio-tp4666294p4666295.html   To unsubscribe from Drawing in a=
 winform using Gtk C# in Xamarin Studio, click here.
 NAML=20





--
View this message in context: http://mono.1490590.n4.nabble.com/Drawing-in-=
a-winform-using-Gtk-C-in-Xamarin-Studio-tp4666294p4666297.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
------=_Part_45693_995325886.1436287326262
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

<div style=3D"color:#000; background-color:#fff; font-family:HelveticaNeue,=
 Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px=
">Thanks for the quick reply.&nbsp; Unfortunately I'm new to all of this an=
d I don't know what I'm doing so I'll try to explain<br><div id=3D"yui_3_16=
_0_1_1436285277837_5740"><span></span></div><div id=3D"yui_3_16_0_1_1436285=
277837_5800">I'm running Windows 7.</div><div id=3D"yui_3_16_0_1_1436285277=
837_5801">I downloaded Monodevelop Xamarin Studio</div><div dir=3D"ltr" id=
=3D"yui_3_16_0_1_1436285277837_5802">When I start a project I choose New So=
lution</div><div id=3D"yui_3_16_0_1_1436285277837_6022" dir=3D"ltr">From th=
ere I chose .NET and Gtk# 2.0 Project</div><div id=3D"yui_3_16_0_1_14362852=
77837_5941" dir=3D"ltr">I then select MainWindow.cs opened with Window Desi=
gner<br></div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1436285277837_5803">I get=
 a form to design and create code for the objects I place on the form. <br>=
</div><div id=3D"yui_3_16_0_1_1436285277837_6021" dir=3D"ltr">When I run th=
e program I get a "Window" that contains all my buttons, etc. <br></div><di=
v id=3D"yui_3_16_0_1_1436285277837_6020" dir=3D"ltr"><br></div><div id=3D"y=
ui_3_16_0_1_1436285277837_6019" dir=3D"ltr">So that's where I'm at.&nbsp; <=
br></div><div id=3D"yui_3_16_0_1_1436285277837_6018" dir=3D"ltr"><br></div>=
<div id=3D"yui_3_16_0_1_1436285277837_6036" dir=3D"ltr">I've placed a "Draw=
ingArea" object (or widget?) from the toolbox onto the form. <br></div><div=
 id=3D"yui_3_16_0_1_1436285277837_6101" dir=3D"ltr"><br></div><div id=3D"yu=
i_3_16_0_1_1436285277837_6102" dir=3D"ltr">Now I would like to draw to that=
 drawing area. <br></div><div id=3D"yui_3_16_0_1_1436285277837_6132" dir=3D=
"ltr"><br></div><div id=3D"yui_3_16_0_1_1436285277837_6303" dir=3D"ltr">So =
I need to find some documentation or tutorials on how to do that. <br></div=
><div id=3D"yui_3_16_0_1_1436285277837_6293" dir=3D"ltr"><br></div><div id=
=3D"yui_3_16_0_1_1436285277837_6291" dir=3D"ltr">That's where I'm at. <br><=
/div><div id=3D"yui_3_16_0_1_1436285277837_6133" dir=3D"ltr"><br></div><div=
 id=3D"yui_3_16_0_1_1436285277837_6215" dir=3D"ltr">So what am I using here=
?&nbsp; Is this a Gtk C# window?&nbsp;&nbsp; Or a Winform?</div><div id=3D"=
yui_3_16_0_1_1436285277837_6155" dir=3D"ltr"><br></div><div id=3D"yui_3_16_=
0_1_1436285277837_6156" dir=3D"ltr">And can I use a standard Windows form i=
n this studio?&nbsp; I used to have Microsoft C# studio and I could draw to=
 a windows forms pretty easily.&nbsp; But it doesn't seem to work the same =
in the Monodevelop Xamarin studio. <br></div><div id=3D"yui_3_16_0_1_143628=
5277837_6325" dir=3D"ltr"><br></div><div id=3D"yui_3_16_0_1_1436285277837_6=
292" dir=3D"ltr">I just need to get past this graphics problem and I can ge=
t on with writing my code to draw the simulations I want to program. <br></=
div><div id=3D"yui_3_16_0_1_1436285277837_6289" dir=3D"ltr"><br></div><div =
id=3D"yui_3_16_0_1_1436285277837_6290" dir=3D"ltr">I just can't figure out =
how to draw to the "DrawingArea" object, or widget? <br></div><div id=3D"yu=
i_3_16_0_1_1436285277837_6347" dir=3D"ltr">I've been looking for a tutorial=
 on how to do that and I couldn't find one. <br></div><div id=3D"yui_3_16_0=
_1_1436285277837_6326" dir=3D"ltr"><br></div><div id=3D"yui_3_16_0_1_143628=
5277837_6340" dir=3D"ltr">Thanks</div><div id=3D"yui_3_16_0_1_1436285277837=
_5940">  <br></div><div id=3D"yui_3_16_0_1_1436285277837_5715" style=3D"fon=
t-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, s=
ans-serif; font-size: 16px;"> <div id=3D"yui_3_16_0_1_1436285277837_5714" s=
tyle=3D"font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucid=
a Grande, sans-serif; font-size: 16px;"> <div id=3D"yui_3_16_0_1_1436285277=
837_5713" dir=3D"ltr"> <hr id=3D"yui_3_16_0_1_1436285277837_6081" size=3D"1=
">  <font id=3D"yui_3_16_0_1_1436285277837_5712" face=3D"Arial" size=3D"2">=
 <b><span style=3D"font-weight:bold;">From:</span></b> Stifu [via Mono] &lt=
;<a href=3D"/user/SendEmail.jtp?type=3Dnode&node=3D4666297&i=3D0" target=3D=
"_top" rel=3D"nofollow" link=3D"external">[hidden email]</a>&gt;<br> <b><sp=
an style=3D"font-weight: bold;">To:</span></b> RoboPi &lt;<a href=3D"/user/=
SendEmail.jtp?type=3Dnode&node=3D4666297&i=3D1" target=3D"_top" rel=3D"nofo=
llow" link=3D"external">[hidden email]</a>&gt; <br> <b id=3D"yui_3_16_0_1_1=
436285277837_6017"><span id=3D"yui_3_16_0_1_1436285277837_6016" style=3D"fo=
nt-weight: bold;">Sent:</span></b> Tuesday, July 7, 2015 12:09 PM<br> <b><s=
pan style=3D"font-weight: bold;">Subject:</span></b> Re: Drawing in a winfo=
rm using Gtk C# in Xamarin Studio<br> </font> </div> <div id=3D"yui_3_16_0_=
1_1436285277837_5804" class=3D"y_msg_container"><br><div id=3D"yiv482408958=
0">

=09Hello,
<br><br>You should either use WinForms or GTK#, not both.
<br>If you want to use WinForms, then you should draw using GDI+, the same =
way you would in .NET.
<br>If you want to use GTK#, then you should draw using GDK (<a id=3D"yui_3=
_16_0_1_1436285277837_5805" rel=3D"nofollow" target=3D"_blank" href=3D"http=
://docs.go-mono.com/?link=3DT%3aGdk.Pixbuf" link=3D"external">http://docs.g=
o-mono.com/?link=3DT%3aGdk.Pixbuf</a>).
<br><br><blockquote style=3D'border-left:2px solid #CCCCCC;padding:0 1em' i=
d=3D"yui_3_16_0_1_1436285277837_6136" style=3D"border-left:2px solid #CCCCC=
C;padding:0 1em;" class=3D"yiv4824089580quote yiv4824089580dark-border-colo=
r"><div id=3D"yui_3_16_0_1_1436285277837_6135" class=3D"yiv4824089580quote =
yiv4824089580light-border-color">
<div id=3D"yui_3_16_0_1_1436285277837_6134" class=3D"yiv4824089580quote-aut=
hor" style=3D"font-weight:bold;">RoboPi wrote</div>
<div id=3D"yui_3_16_0_1_1436285277837_6588" class=3D"yiv4824089580quote-mes=
sage yiv4824089580shrinkable-quote">Hello,
<br><br>I'm looking for help or tutorials on how to draw to a drawingarea o=
n a Windows Form using C# in Xamarin Studio. &nbsp;I just need to draw simp=
le shapes, line, rectangles, circles, and be able to fill them in with colo=
r.=20
<br><br>A simple sample code would be great.
<br><br>I haven't been able to find anything on YouTube or Google.=20
<br>Any help will be greatly appreciated.
<br>Thank you,
<br>James
</div>
</div></blockquote>


=09
=09
=09
=09<br>
=09<br>
=09<hr color=3D"#cccccc" noshade=3D"" size=3D"1">
=09<div style=3D"color:#444;font:12px tahoma, geneva, helvetica, arial, san=
s-serif;">
=09=09<div style=3D"font-weight:bold;">If you reply to this email, your mes=
sage will be added to the discussion below:</div>
=09=09<a rel=3D"nofollow" target=3D"_blank" href=3D"http://mono.1490590.n4.=
nabble.com/Drawing-in-a-winform-using-Gtk-C-in-Xamarin-Studio-tp4666294p466=
6295.html" link=3D"external">http://mono.1490590.n4.nabble.com/Drawing-in-a=
-winform-using-Gtk-C-in-Xamarin-Studio-tp4666294p4666295.html</a>
=09</div>
=09<div style=3D"color:#666;font:11px tahoma, geneva, helvetica, arial, san=
s-serif;margin-top:.4em;line-height:1.5em;">
=09=09
=09=09To unsubscribe from Drawing in a winform using Gtk C# in Xamarin Stud=
io, <a rel=3D"nofollow" target=3D"_blank" href=3D"" link=3D"external">click=
 here</a>.<br>
=09=09<a rel=3D"nofollow" target=3D"_blank" href=3D"http://mono.1490590.n4.=
nabble.com/template/NamlServlet.jtp?macro=3Dmacro_viewer&amp;id=3Dinstant_h=
tml%21nabble%3Aemail.naml&amp;base=3Dnabble.naml.namespaces.BasicNamespace-=
nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNames=
pace&amp;breadcrumbs=3Dnotify_subscribers%21nabble%3Aemail.naml-instant_ema=
ils%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" style=
=3D"font:9px serif;" link=3D"external">NAML</a>
=09</div></div><br><br></div> </div> </div>  </div>

=09
=09
=09
<br/><hr align=3D"left" width=3D"300" />
View this message in context: <a href=3D"http://mono.1490590.n4.nabble.com/=
Drawing-in-a-winform-using-Gtk-C-in-Xamarin-Studio-tp4666294p4666297.html">=
Re: Drawing in a winform using Gtk C# in Xamarin Studio</a><br/>
Sent from the <a href=3D"http://mono.1490590.n4.nabble.com/Mono-WinForms-f1=
539989.html">Mono - WinForms mailing list archive</a> at Nabble.com.<br/>
------=_Part_45693_995325886.1436287326262--

--===============0102066843==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Mono-winforms-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

--===============0102066843==--