Jump to content

Keyboard and textedit problem


nimaltd

Recommended Posts

use this function for create keyboard and textbox

static void createPagePage2(void)
{
    GWidgetInit wi;
    gwinWidgetClearInit(&wi);


    // create container widget: ghContainerPage2
    wi.g.show = FALSE;
    wi.g.x = 0;
    wi.g.y = 0;
    wi.g.width = 240;
    wi.g.height = 320;
    wi.g.parent = 0;
    wi.text = "Container";
    wi.customDraw = 0;
    wi.customParam = 0;
    wi.customStyle = 0;
    ghContainerPage2 = gwinContainerCreate(0, &wi, 0);

    // Create textedit widget: ghTextedit_FileName
    wi.g.show = TRUE;
    wi.g.x = 100;
    wi.g.y = 30;
    wi.g.width = 130;
    wi.g.height = 30;
    wi.g.parent = ghContainerPage2;
    wi.text = "";
    wi.customDraw = gwinTexteditDefaultDraw;
    wi.customParam = 0;
    wi.customStyle = 0;
    ghTextedit_FileName = gwinTexteditCreate(0, &wi, 8);

    // Create label widget: ghLabel1
    wi.g.show = TRUE;
    wi.g.x = 10;
    wi.g.y = 30;
    wi.g.width = 90;
    wi.g.height = 30;
    wi.g.parent = ghContainerPage2;
    wi.text = "File Name :";
    wi.customDraw = gwinLabelDrawJustifiedLeft;
    wi.customParam = 0;
    wi.customStyle = 0;
    ghLabel1 = gwinLabelCreate(0, &wi);
    gwinLabelSetBorder(ghLabel1, FALSE);

    // Create keyboard widget: ghKeyboard1
    wi.g.show = TRUE;
    wi.g.x = 0;
    wi.g.y = 110;
    wi.g.width = 250;
    wi.g.height = 180;
    wi.g.parent = ghContainerPage2;
    wi.text = "Keyboard1";
    wi.customDraw = gwinKeyboardDraw_Normal;
    wi.customParam = 0;
    wi.customStyle = 0;
    ghKeyboard1 = gwinKeyboardCreate(0, &wi);
}

I have no problem in first time use.

but when I want use again this keyboard , I must be empty text box and use again , I call   gwinsettext(ghTextedit_FileName,"",TRUE)   for emty text box.

and  I call this page , Now when I push any key on keyboard system Hang . call assert(.......

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...