This project is read-only.

InputControl character gets printed twice

Feb 3, 2011 at 5:54 AM


I'm new to the nuclex framework and try to make a textbox where the user can enter some text. Basicallly I did the following in my
Game class:


public Game()
{                   = new GraphicsDeviceManager(this);
    this.gui                        = new GuiManager(this.Services);
    this.input                      = new InputManager(this.Services);        
protected override void Initialize()
    Viewport viewport               = this.GraphicsDevice.Viewport;
    Screen screen                   = new Screen(viewport.Width, viewport.Height);

    this.gui.Screen                 = screen;

    screen.Desktop.Bounds = new UniRectangle(
        new UniScalar(0.1f, 0.0f), new UniScalar(0.1f, 0.0f), // x and y
        new UniScalar(0.8f, 0.0f), new UniScalar(0.8f, 0.0f)); // width and height

    this.text = new Nuclex.UserInterface.Controls.Desktop.InputControl();
    this.text.Text = "";
    this.text.Bounds = new UniRectangle(10.0f, 40.0f, 410.0f, 30.0f);


Whenever i hit a keyboard character it gets printed twice in the input control. That means if I hit abc
the text in the input control is: aabbcc.

What am I doing wrong?

Feb 4, 2011 at 10:34 PM

Are you using the Subversion trunk sources or nightly builds?

I'm asking because this has been an issue (fixed as of now) I introduced while porting the GUI over to my Nuclex.Input library. It should not happen in the R1242 release on CodePlex. If you're using the trunk build, please try updating to today's build, the issue should be gone now (and if not, it would be nice if you could try it with the trunk build anyway to let me know if it still occurs :D).

Nightly builds can be found here:


Feb 7, 2011 at 6:00 PM


I was using the latest stable release available. Now I use the latest daily build and it works perfectly now.


Thanks for Your help!


Best Regards

Feb 7, 2011 at 10:50 PM

Great :)

If you prefer to stay on the stable releases, this fix also made it into the R1323 package I released on Saturday.

However, as you might have noticed by the forum activity, a few bugs have slipped into that release, so the daily builds are, ahem, *more* stable right now. My current plan is to hold out for a few more days to see if any more bugs pop up and then upload another stable release!