[MonoDevelop] How to add to Toolbox
George Lober
georgelober at glowsoftware.ca
Thu Jul 26 22:59:09 EDT 2007
Rafael Teixeira wrote:
> Some more info, inline.
>
> On 7/26/07, George Lober <georgelober at glowsoftware.ca> wrote:
>
>> Rafael Teixeira wrote:
>> > Hi,
>> >
>> > On 7/24/07, George Lober <georgelober at glowsoftware.ca> wrote:
>> >> Rafael Teixeira wrote:
>> >> > You are mixing incompatible graphical technologies, NPlot and
>> >> > ZedGraph, are WinForms controls, and currently MonoDevelop has
>> only a
>> >> > designer for GTK#.
>> >>
>> >> I did try the 0.9.9.2 version of NPlot which according to
>> >> http://www.mono-project.com/Libraries and
>> >> http://netcontrols.org/nplot/wiki/ is a GTK# version. ???
>> >
>> > They have both, AFAIR, so you need to use the right one.
>> >
>> Admittedly I did try other versions because it wasn't loading into the
>> toolbox, but the gtk version is the nplot-gtk-0.9.9.2.tar
>> <http://netcontrols.org/nplot/downloads/nplot-gtk-0.9.9.2.tar> which can
>> be gotten here:
>> http://netcontrols.org/nplot/wiki/index.php?n=Main.DownloadArea among
>> other locations, and this one also does not load. I assume you are
>> supposed to select the .dll file to load the widget, thou I have to say
>> that it is kind of strange to me to use dlls in a Linux environment.
>
> The problem is that Stetic, the GTK# GUI designer module in
> MonoDevelop, expects controls to expose additional metadata, like the
> ones you can create with it yourself, and the nplot control/widget
> probably doesn't have it.
>
> Nevertheless, you can use it, by designing the rest of the
> form/window, not forgetting to prepare a container for the control,
> and them adding the control on code, in short, Stetic will generate
> only part of the code to build the UI. Also someone could take the
> opportunity to build an Stetic wrapper/adapter around nplot, so that
> everybody could use this wrapped nplot widget as any other widget that
> Stetic supports.
>
This looks worrisome. I have searched around and it is looking like
there isn't much in the way of, for the lack of a better word, "plug &
play" components/widgets for Stetic from other sources like there is in
the Delphi environment. For the app I would like to convert, I need to
find a way to substitute the functionality of a TStringGrid and
TListView. If there are no third party widgets, correct me if I'm wrong,
the only thing I see in the toolbox that may be usable for this purpose
is the TextView widget. Can this display cells/rows/columns ? I also
need a charting widget which displays bars and pies, but as NPlot and
ZedGraph are the only candidates I have found, this looks like a
challenge. I also need a DateEdit widget, which I do see in the Glade
toolbox but not in Stetic. What steps would I need to take to use that
one under Stetic ?
>>
>> Yes, I have looked at these pages, but these don't answer all my
>> questions. I guess a certain level of knowledge is assumed. For example
>> , I know that C#(a C++ copy as I see it) is a Microsoft created language
>> and is used in .net, and also that C# is mentioned in mono
>> documentation.
>
> Most code in Mono is written in C#, including our C# compiler and tens
> of thousands of classes in the core and extended libraries. A small
> part of the code in Mono is in VB.NET including the VB.NET compiler,
> and the runtime basic bits are written in C.
>
> So knowing C#, is kind of a prerequisite to better understand the
> runtime environment and IDE you are using (most of MD is written in C#
> also, with additional modules in Boo, and some other languages that
> target the Mono/.NET environment).
>
>> Then there is GTK# which is a wrapper for GTK+, which
>> uses C/C++.
>
> GTK+, uses only C, as all Gnome things in general, because things like
> non-standardized C++ name-mangling made it less portable at those
> ancient times, when the decision was made.
>
> GTK# is a wrapper written in C#, with small bits of C glue code, to
> offer all GTK+ widgets to programs written with any Mono/.NET
> language.
>
>> The thing is I don't actually see it saying anywhere what
>> language GTK# uses. I deduce it must be C#. Is this correct?
>
> Already answered.
>
> The thing is: you can, in Linux, use Mono with a choice of languages:
> C# (the best supportted language in Mono and MD). VB.NET and Boo
> (similar to Python but statically typed) also are well supported by
> MD. AFAIK also Nemerle, IronPython and maybe IronRuby, work well in
> Mono but doesn't have direct support in MD (you still can use it, but
> lots of niceties aren't offered for these other languages).
>
> The most limiting factor in truth is that, currently, Stetic only
> generates C# code so if you'd like to use the Designer, you'll need to
> code the UI in that language, but then you can write your main logic,
> in any other supported language, as long as you house it in a library
> project (dll) (or vice-versa, you can put all the UI in a C# library
> to call from your Boo main program, for instance).
>
> Some support for Java programming was put into MD, a long time ago,
> because you can run Java programs in Mono, inside a C# written Java
> VM, called IKVM (or you can convert Java jars to Mono dlls with
> IKVMC), but I didn't notice it (MD Java support) being actively
> maintained of lately.
>
> Hope it helps you and some others to sort out the current "state of
> the nation" in mono/md-land.
All in all a fabulous reply. Much appreciated. As other people, I have
found the whole .net thing mixing of languages confusing right from the
beginning, so while this information may seem trivial to the more
experienced, beginners need this kind of info. It would be great if you
or someone would post this kind of an overview of things as it relates
to MonoDevelop/Stetic specifically, on the MonoDevelop or Stetic web site.
George
More information about the Monodevelop-list
mailing list