<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Changing the Direction of ListBox - Comments</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox</link>
 <description>Comments for &quot;Changing the Direction of ListBox&quot;</description>
 <language>en</language>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41734</link>
 <description>&lt;p&gt;Hi,&lt;br /&gt;
How can CAknDoubleStyleListBox be right alined? &lt;br /&gt;
ItemDrawer()-&gt;ColumnData()-&gt;SetColumnAlignmentL(1, CGraphicsContext::ERight); can not be used for it.&lt;br /&gt;
Thanks.&lt;/p&gt;</description>
 <pubDate>Sun, 23 Sep 2007 08:22:34 +0200</pubDate>
 <dc:creator>Rostam</dc:creator>
 <guid isPermaLink="false">comment 41734 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41626</link>
 <description>&lt;p&gt;&lt;br /&gt;
What you can do is set the alignment every time to refill your List Box. Thats the only logical solution i can think of!  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/shock.png&quot; title=&quot;Shocked&quot; alt=&quot;Shocked&quot; /&gt; &lt;/p&gt;</description>
 <pubDate>Wed, 19 Sep 2007 15:10:39 +0200</pubDate>
 <dc:creator>jp4symbian</dc:creator>
 <guid isPermaLink="false">comment 41626 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41625</link>
 <description>&lt;p&gt;SetListItemsL is in my DBMSListboxView.cpp and in this function, I set the direction of the listbox.&lt;br /&gt;
I call SetListItemsL from ShowAllRecords which is a function in DBMSAppui.cpp( iListboxView-&gt;SetListItemsL(names); )&lt;br /&gt;
When I click Back in InfoWinL (and everywhere in my program), ShowAllRecordsL() is called. DBMSAppui direction is by default left-to-right and this may cause my listbox be shown left-to-right.  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/shock.png&quot; title=&quot;Shocked&quot; alt=&quot;Shocked&quot; /&gt; &lt;/p&gt;</description>
 <pubDate>Wed, 19 Sep 2007 14:52:53 +0200</pubDate>
 <dc:creator>Rostam</dc:creator>
 <guid isPermaLink="false">comment 41625 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41621</link>
 <description>&lt;p&gt;&lt;br /&gt;
Thats really strange!!&lt;br /&gt;
Are you refreshing your List Box data after clicking &#039;Back&#039; button of the Pop-up?&lt;/p&gt;

&lt;p&gt;The alignment should ideally not go even if the ListBox data is refreshed...&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 19 Sep 2007 14:21:33 +0200</pubDate>
 <dc:creator>jp4symbian</dc:creator>
 <guid isPermaLink="false">comment 41621 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41618</link>
 <description>&lt;p&gt;Again something strange, When I show the details of a name with &quot;iEikonEnv-&gt;InfoWinL(KDetailsCaption, name);&quot; in DBMSAppui.cpp, and click back command, The direction of listbox returns back to left-to-right. I have added &quot;iListBox2-&gt;ItemDrawer()-&gt;ColumnData()-&gt;SetColumnAlignmentL(1, CGraphicsContext::ERight);&quot; in CDBMSListboxView::ConstructL, CDBMSListboxView::SetListItemsL, CDBMSListboxView::SizeChanged but it did not helped.&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Wed, 19 Sep 2007 13:34:16 +0200</pubDate>
 <dc:creator>Rostam</dc:creator>
 <guid isPermaLink="false">comment 41618 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41613</link>
 <description>&lt;p&gt;No, I want to create a database of hospitals in my town, &lt;img src=&quot;/sites/all/modules/smileys/packs/example/wink.png&quot; title=&quot;Eye-wink&quot; alt=&quot;Eye-wink&quot; /&gt; &lt;/p&gt;</description>
 <pubDate>Wed, 19 Sep 2007 12:28:19 +0200</pubDate>
 <dc:creator>Rostam</dc:creator>
 <guid isPermaLink="false">comment 41613 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41612</link>
 <description>&lt;p&gt;&lt;br /&gt;
Great to know that you succeeded.  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt; &lt;/p&gt;

&lt;p&gt;But are you doing all this to fetch &amp; display your PhoneBook Contacts?&lt;/p&gt;</description>
 <pubDate>Wed, 19 Sep 2007 12:17:58 +0200</pubDate>
 <dc:creator>jp4symbian</dc:creator>
 <guid isPermaLink="false">comment 41612 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41611</link>
 <description>&lt;p&gt;Dear jp4symbian,&lt;br /&gt;
The problem of eikclbd.h  is solved now, I try to do the last thing which is using OK button  to show the details of a name like Contact list, Thanks.&lt;/p&gt;</description>
 <pubDate>Wed, 19 Sep 2007 11:39:58 +0200</pubDate>
 <dc:creator>Rostam</dc:creator>
 <guid isPermaLink="false">comment 41611 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41594</link>
 <description>&lt;p&gt;I really don&#039;t understand why you are getting so many problems in a list box!!! &lt;img src=&quot;/sites/all/modules/smileys/packs/example/puzzled.png&quot; title=&quot;Puzzled&quot; alt=&quot;Puzzled&quot; /&gt; &lt;/p&gt;

&lt;p&gt;And listbox is not click-able by default. You have to manually provide such functionality by providing another view which displays the details, on click of OK button.&lt;/p&gt;

&lt;p&gt;The last option now left is that you mail me your source code, only then i can make out what REALLY  is the problem with your code!!  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/shock.png&quot; title=&quot;Shocked&quot; alt=&quot;Shocked&quot; /&gt; &lt;/p&gt;</description>
 <pubDate>Tue, 18 Sep 2007 15:43:50 +0200</pubDate>
 <dc:creator>jp4symbian</dc:creator>
 <guid isPermaLink="false">comment 41594 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41593</link>
 <description>&lt;p&gt;when I include it I get this error message:&lt;br /&gt;
the file &#039;eikclbd.h &#039; cannot be opened&lt;/p&gt;

&lt;p&gt;why this file can not be opened?&lt;/p&gt;

&lt;p&gt;And another thing, I want to the listbox item be clickable, Now I can see the details of a name with a menu button, but I want to show the details of a name just by clicking OK button just like Contact List. &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt;  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/wink.png&quot; title=&quot;Eye-wink&quot; alt=&quot;Eye-wink&quot; /&gt;  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; /&gt;  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/lol.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; /&gt;  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/tongue.png&quot; title=&quot;Sticking out tongue&quot; alt=&quot;Sticking out tongue&quot; /&gt;  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/shock.png&quot; title=&quot;Shocked&quot; alt=&quot;Shocked&quot; /&gt;  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/puzzled.png&quot; title=&quot;Puzzled&quot; alt=&quot;Puzzled&quot; /&gt;  &lt;img src=&quot;/sites/all/modules/smileys/packs/example/cool.png&quot; title=&quot;Cool&quot; alt=&quot;Cool&quot; /&gt; &lt;/p&gt;</description>
 <pubDate>Tue, 18 Sep 2007 14:58:51 +0200</pubDate>
 <dc:creator>Rostam</dc:creator>
 <guid isPermaLink="false">comment 41593 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41592</link>
 <description>&lt;p&gt;&lt;br /&gt;
Have you included eikclbd.h ?&lt;/p&gt;</description>
 <pubDate>Tue, 18 Sep 2007 14:42:03 +0200</pubDate>
 <dc:creator>jp4symbian</dc:creator>
 <guid isPermaLink="false">comment 41592 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41588</link>
 <description>&lt;p&gt;I try to use iListBox2-&gt;ItemDrawer()-&gt;ColumnData()-&gt;SetColumnAlignmentL(1, CGraphicsContext::ERight); as ip4symbian said, but no method appears automatically after iListBox2-&gt;ItemDrawer()-&gt;ColumnData() by eclipse. if I use the first command, I get these errors:&lt;/p&gt;

&lt;p&gt;ERight);[=        iListBox2-&gt;ItemDrawer]&lt;br /&gt;
illegal use of incomplete struct/union/class &#039;CColumnListBoxData&#039;&lt;/p&gt;</description>
 <pubDate>Tue, 18 Sep 2007 13:18:24 +0200</pubDate>
 <dc:creator>Rostam</dc:creator>
 <guid isPermaLink="false">comment 41588 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41583</link>
 <description>&lt;p&gt;excuse me, I thought I had added eikctl.lib, it was the problem &lt;img src=&quot;/sites/all/modules/smileys/packs/example/wink.png&quot; title=&quot;Eye-wink&quot; alt=&quot;Eye-wink&quot; /&gt; &lt;/p&gt;</description>
 <pubDate>Tue, 18 Sep 2007 12:40:51 +0200</pubDate>
 <dc:creator>Rostam</dc:creator>
 <guid isPermaLink="false">comment 41583 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41582</link>
 <description>&lt;p&gt;I have checked the necessary .lib and header files, It works fine with 3rd eddition but this error occurs in 2nd eddition.&lt;/p&gt;</description>
 <pubDate>Tue, 18 Sep 2007 12:28:23 +0200</pubDate>
 <dc:creator>Rostam</dc:creator>
 <guid isPermaLink="false">comment 41582 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox#comment-41580</link>
 <description>&lt;p&gt;Hi Rostam,&lt;/p&gt;

&lt;p&gt;I think there is some misunderstanding. There is no difference in using CAknSingleStyleListBox or CAknDoubleStyleListBox  as long as the following lines are concerned:&lt;br /&gt;
  iListBox2-&gt;Model()-&gt;SetItemTextArray(itemList);&lt;br /&gt;
  iListBox2-&gt;Model()-&gt;SetOwnershipType(ELbmOwnsItemArray);&lt;/p&gt;

&lt;p&gt;Maybe there is some change that you have forgotten to do  when you use CAknSingleStyleListBox instead of CAknDoubleStyleListBox. Make sure you have made all necessary changes in header file n all.&lt;/p&gt;

&lt;p&gt;Also I can tell you a better way to format.&lt;br /&gt;
Suppose if you are using CAknSingleStyleListBox.&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;_LIT(KListFormat,&quot;_LIT(KListItemFormat, &quot;\t%S\t\t&quot;);		// Initiliaze the list format of the list you are using/b]&lt;br /&gt;
_LIT(KListItem,&quot;Item1&quot;);&lt;/p&gt;

&lt;p&gt;TBuf&lt;256&gt; item(KListItem); &lt;br /&gt;
TBuf&lt;256&gt; insertString;&lt;/p&gt;

&lt;p&gt;// Format the data &lt;br /&gt;
[b]insertString.Format(KListItemFormat,&amp;item);		// Use the format function&lt;/span&gt;&lt;br /&gt;
iItemArray = static_cast&lt;CDesCArray*&gt;(iListBox-&gt;Model()-&gt;ItemTextArray());&lt;br /&gt;
		&lt;br /&gt;
iItemArray -&gt;AppendL(listboxItems++, insertString);&lt;br /&gt;
iListBox-&gt;HandleItemAdditionL();&lt;br /&gt;
iListBox-&gt;SetCurrentItemIndex(0);&lt;br /&gt;
DrawDeferred();&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Tue, 18 Sep 2007 12:19:34 +0200</pubDate>
 <dc:creator>jp4symbian</dc:creator>
 <guid isPermaLink="false">comment 41580 at http://www.newlc.com</guid>
</item>
<item>
 <title>Changing the Direction of ListBox</title>
 <link>http://www.newlc.com/en/forum/changing-direction-listbox</link>
 <description>&lt;p&gt;Hi,&lt;br /&gt;
Is there any way to change the direction of listbox from &quot;left-to-right&quot; to &quot;right-to-left&quot;? You know, I use a database of farsi words which I want to show them in order with a list box; the problem is that the words are shown not only left to right, but also in reverse character order.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/forum/changing-direction-listbox&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/forum/changing-direction-listbox#comments</comments>
 <category domain="http://www.newlc.com/en/forums/symbian-c">Symbian C++</category>
 <pubDate>Tue, 11 Sep 2007 14:34:36 +0200</pubDate>
 <dc:creator>Rostam</dc:creator>
 <guid isPermaLink="false">18933 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
