Hi everybody,
I am trying to use Glide in my Fez Spider kit and while buttons and text boxes work fine, I am having serious trouble with the Dropdown element, I can’t make it work.
This is the XML generated in the Glide designer:
Label0 Label1Very simple screen with a dropdown control at the center with just two options. This is the C# code of a very simple application that just shows the Dropdown:
using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Presentation.Shapes;
using Microsoft.SPOT.Touch;
using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
using GHI.Glide;
using GHI.Glide.Display;
using GHI.Glide.UI;
namespace TestDropdown
{
public partial class Program
{
private static GHI.Glide.Display.Window mainWindow;
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
/*******************************************************************************************
Modules added in the Program.gadgeteer designer view are used by typing
their name followed by a period, e.g. button. or camera.
Many modules generate useful events. Type +=<tab><tab> to add a handler to an event, e.g.:
button.ButtonPressed +=<tab><tab>
If you want to do something periodically, use a GT.Timer and handle its Tick event, e.g.:
GT.Timer timer = new GT.Timer(1000); // every second (1000ms)
timer.Tick +=<tab><tab>
timer.Start();
*******************************************************************************************/
// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
Debug.Print("Program Started");
mainWindow = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.mainWindow));
Dropdown dd = (Dropdown)mainWindow.GetChildByName("drop");
dd.TapEvent += dd_TapEvent;
GlideTouch.Initialize();
Glide.MainWindow = mainWindow;
}
void dd_TapEvent(object sender)
{
Debug.Print("TAP");
}
}
}
Of course, I added the XML as a string resource as explained in the Guide tutorial. When I start the device, the LCD shows the dropdown control (strangely with the arrow upside down) (see dropdown1 picture) and when I tap on the control I don’t see the options and therefore I can’t select any option (however the arrow is not upside down while tapped, see dropdown2 picture).
I have tried a lot of things and I have spent my entire afternoon trying to figure out what is wrong. For example I tried adding items dinamically, because I want to use the dropdown to visualize Wifi networks If anybody has any idea what is wrong please let me know.
These are the specs of my setup:
I am using Visual Studio 2012 Express on Windows 7 64 bits. This is the firmware I have:
Loader (TinyBooter) version information:
4.3.4.0 on this computer.
4.3.4.0 on this device.
The Loader (TinyBooter) is up to date. <<<
Firmware (TinyCLR) version information:
4.3.6.0 on this computer.
4.3.6.0 on this device.
The Firmware (TinyCLR) is up to date. <<<
Any help will be greatly appreciated!
Kind regards,
Federico