×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Password cursor and alignment

    Hi,

    I've used Carbide UI Designer to create a password-query dialog.

    I have two problems with it:

    1. Cursor is not shown.
    2. It is center-aligned.

    Below is the code + resource.

    How can I make the cursor appear, and make text left-aligned, while still maintaining the password-input behavior (hiding the characters, using stars)?

    Code:
    TIntCHohoContainerView::RunPasswordQueryL( 
    		TDes& aData, 
    		TBool aUseDefaults, 
    		const TDesC* aOverridePrompt )
    	{
    	if ( aUseDefaults )
    		{
    	
    		}
    				
    	CAknTextQueryDialog* queryDialog = CAknTextQueryDialog::NewL( aData );	
    	
    	if ( aOverridePrompt != NULL )
    		{
    		CleanupStack::PushL( queryDialog );
    		queryDialog->SetPromptL( *aOverridePrompt );
    		CleanupStack::Pop(); // queryDialog
    		}
    	
    	return queryDialog->ExecuteLD( R_HOHO_CONTAINER_PASSWORD_QUERY );
    	}
    Code:
    RESOURCE DIALOG r_hoho_container_password_query
    	{
    	flags = EAknGeneralQueryFlags;
    	buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
    	items =
    		{
    		DLG_LINE
    			{
    			type = EAknCtQuery;
    			id = EHohoContainerViewSecret1;
    			control = AVKON_DATA_QUERY
    				{
    				layout = ECodeLayout;
    				label = STR_HohoContainerView_6;
    				control = SECRETED
    					{
    					};
    				};
    			}
    		};
    	}
    Thanks,
    Nadav

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Arrow Re: Password cursor and alignment

    Hi,

    nadav70, Have you tried CEikSecretEditor.

    you can do all these things easily with this api

    Thanks

  3. #3
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Re: Password cursor and alignment

    Thanks a lot. I'm afraid this means I need to write my own dialog, embedding this control in it. So for simplicity, I've decided using a plain-text dialog.

    Thanks a lot for your response,
    Nadav

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×