×

Discussion Board

Results 1 to 7 of 7

Threaded View

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    Question How to create a Toolbar with image button ?

    I have just create a Toolbar by using CAknToolbar. The Toolbar Items is button, now I want to change the button to Images. How can I do it?
    this is my code:
    Code:
    RESOURCE AVKON_TOOLBAR r_test_toolbar
    	{
    		flags = KAknToolbarFixed;
    		items =
    		{
    				TBAR_CTRL
    					{
    						type = EAknCtButton;
    						id = ECommand2; // We are using same set of commands as of used in AppUi:HandleCommandL
    						control = AVKON_BUTTON
    						{
    							flags = KAknButtonTextInsideFrame;
    							states =
    							{
    									AVKON_BUTTON_STATE
    										{
    											txt = "button3";
    											helptxt = "help text3";
    										}
    							};
    						};
    					},
    				TBAR_CTRL
    					{
    						type = EAknCtButton;
    						id = ECommand2;
    						control = AVKON_BUTTON
    						{
    							flags = KAknButtonTextInsideFrame;
    							states =
    							{
    									AVKON_BUTTON_STATE
    										{
    											txt = "button2";
    											helptxt = "help text2";
    										}/*,
    									AVKON_BUTTON_STATE
    										{
    											txt = "button2";
    											helptxt = "help text2";
    											flags = KAknButtonStateHasLatchedFrame;
    										}*/
    									
    							};
    						};
    					},
    					TBAR_CTRL
    						{
    							type = EAknCtToolbarExtension;
    							control = AVKON_TOOLBAR_EXTENSION
    							{
    								flags = KAknTbExtensionTransparent;
    								items =
    								{
    									TBAR_CTRL
    										{
    											type = EAknCtButton;
    											id = ECommand2;
    											control = AVKON_BUTTON
    											{
    												flags = KAknButtonTextInsideFrame;
    												states =
    												{
    													AVKON_BUTTON_STATE
    														{
    															txt = "b2";
    															helptxt = "help text2";
    														}
    												};
    											};
    										},
    										TBAR_CTRL
    										{
    											type = EAknCtButton;
    											id = ECommand2;
    											control = AVKON_BUTTON
    											{
    												flags = KAknButtonTextInsideFrame;
    												states =
    												{
    													AVKON_BUTTON_STATE
    														{
    															txt = "b5";
    															helptxt = "help text2";
    														}
    												};
    											};
    										},
    										TBAR_CTRL
    										{
    											type = EAknCtButton;
    											id = ECommand2;
    											control = AVKON_BUTTON
    											{
    												flags = KAknButtonTextInsideFrame;
    												states =
    												{
    													AVKON_BUTTON_STATE
    														{
    															txt = "b2";
    															helptxt = "help text2";
    														}
    												};
    											};
    										},
    										TBAR_CTRL
    										{
    											type = EAknCtButton;
    											id = ECommand2;
    											control = AVKON_BUTTON
    											{
    												flags = KAknButtonTextInsideFrame;
    												states =
    												{
    													AVKON_BUTTON_STATE
    														{
    															txt = "b2";
    															helptxt = "help text2";
    														}
    												};
    											};
    										}										
    								};
    							};
    						}
    		};
    	}
    Last edited by trung.vo; 2009-07-09 at 10:33.

Similar Threads

  1. ToolBar Problem
    By mallikachand in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-09-27, 20:02
  2. How to create Application Icons?
    By kssoumya in forum Symbian User Interface
    Replies: 0
    Last Post: 2008-08-25, 07:16
  3. Replies: 1
    Last Post: 2008-03-12, 15:16
  4. how to create a grid
    By ddhungry in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-11-27, 08:08

Posting Permissions

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