Using the designer

I am using the Glide designer on the web (from the Glide home page)…is this the full-blown designer, or just a demo?
There are no real instructions for using this, nor any help buttons.

For example, I don’t see how you select the background colors for a button (say you want red)… clicking on the TintColor field does not seem to bring up any palette of color choices.

I have several fonts I’ve created, but when I try to set to those, my only choces seem to be some droid fonts?

How is this supposed to work? Is this designer really just to physically position the controls on the field?

The designer is pretty basic, in my experience. But again, as far as I’m aware, it’s the only designer available for doing visual UI design on NETMF, so… :slight_smile:

so are the Droid fonts the only ones that can be used?

Not sure about that. I’ve only used the fonts that come pre-configured with the Gadgeteer projects.

There is a thread here about converting custom fonts. I dont remember the title though.

I already HAVE the custom fonts, but how are they used with Glide?!?

You can add it into the Glide project and make them available same way as droid fonts.

<Glide Version="1.0.3">
  <Window Name="window" Width="800" Height="480" BackColor="dc0090">
    <Button Name="btn" X="100" Y="104" Width="120" Height="32" Alpha="255" Text="Click me" Font="4" FontColor="000000" DisabledFontColor="808080" TintColor="000000" TintAmount="0"/>
  </Window>
</Glide>

The font is specified as “4” (whatever that means)…how would you change it to something else?
I did add the font as a resource, but don’t see a way to access it here

ahhhhh…maybe this does it:

btn.Font = Resources.GetFont(Resources.FontResources.calibri48);

what a crazy assemblage…how do you know how to put that together…I’m doing a lot of guessing…is there some practical guidance?

Can one not perhaps use the Visual Studio Windows Forms designer? It generates code that should port very well to NETMF - provided the controls have the same names and behaviour.

One could also create a set of UI controls to use in the designer that have equivalents in Glide (or Pyxis or whatever). It could replace the System.Windows.Forms namespace with a NETMF one.

It may be hard to integrate it seamlessly into the NETMF designer, but I don’t mind using the Forms designer and copying the generated code to a project.

I’m using a similar approach with my teeny weeny monochrome LCD graphics lib for Panda and it seems to have potential.

Here’s an example of the code Forms Designer generates:


namespace WindowsFormsApplication1
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.button1 = new System.Windows.Forms.Button();
            this.label1 = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // textBox1
            // 
            this.textBox1.Location = new System.Drawing.Point(153, 141);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(100, 20);
            this.textBox1.TabIndex = 0;
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(153, 167);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 1;
            this.button1.Text = "button1";
            this.button1.UseVisualStyleBackColor = true;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(150, 115);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(35, 13);
            this.label1.TabIndex = 2;
            this.label1.Text = "label1";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(519, 389);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.textBox1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Label label1;
    }
}