<?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 - CEikTextListBox ?? - Comments</title>
 <link>http://www.newlc.com/topic-7805</link>
 <description>Comments for &quot;CEikTextListBox ??&quot;</description>
 <language>en</language>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19889</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Now its work! I forget include eiklbo.h-file.&lt;/div&gt;</description>
 <pubDate>Wed, 07 Dec 2005 21:36:08 +0100</pubDate>
 <dc:creator>taiffu</dc:creator>
 <guid isPermaLink="false">comment 19889 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19888</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;How about this ? I get error error C2061: syntax error : identifier &amp;#039;TListBoxEvent&amp;#039;. What i need?&lt;/div&gt;</description>
 <pubDate>Wed, 07 Dec 2005 12:15:51 +0100</pubDate>
 <dc:creator>taiffu</dc:creator>
 <guid isPermaLink="false">comment 19888 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19887</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;thank you... it works now&amp;nbsp; &amp;nbsp;&lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/smiley.gif&quot; alt=&quot;Smiley&quot; border=&quot;0&quot; /&gt; &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/smiley.gif&quot; alt=&quot;Smiley&quot; border=&quot;0&quot; /&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 02 Jun 2005 17:14:36 +0200</pubDate>
 <dc:creator>ivolein</dc:creator>
 <guid isPermaLink="false">comment 19887 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19886</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Well, since you didn&amp;#039;t take a hint of my previous message, here&amp;#039;s a sample code to show how easily you could have done this without messing with pointer events...Â  &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/wink.gif&quot; alt=&quot;Wink&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;First, make your control an observer of listbox:&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;class CMyContainer : &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;public CCoeControl,&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;public MEikListBoxObserver,&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;public MCoeControlObserver&lt;br /&gt;{&lt;br /&gt;...&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// From MEikListBoxObserver&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);&lt;br /&gt;...&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Then implement the listbox observer interface:&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;void CMyContainer::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType)&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if((aListBox == iTextListBox) &amp;amp;&amp;amp; (aEventType == EEventItemClicked || aEventType == EEventEnterKeyPressed))&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;TInt selected = iTextListBox-&amp;gt;CurrentItemIndex();&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if (selected &amp;gt;= 0)&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{ // Do whatever you want with the selection index.&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Also, you have to set your container to be an observer of the listbox (in ConstructL of your container):&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;iTextListBox-&amp;gt;SetListBoxObserver(this);&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;iTextListBox-&amp;gt;SetObserver(this); // required to get the selection change events too.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The SetObserver is only needed if you also implement the MCoeControlObserver interface.&lt;br /&gt;&lt;br /&gt;Now you will get the HandleListBoxEventL called only when the click happened on the listbox. With pointer events, you won&amp;#039;t get this event when the user uses the keyboard to scroll and select the item, with this way it does not matter if the user uses the touch display or the keyboard -- both work.&lt;br /&gt;&lt;br /&gt;If you also want to know when the selection changes (without actually selecting the item on the list), implement also the MCoeControlObserver interface (otherwise, just don&amp;#039;t inherit it):&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;void CMyContainer::HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType)&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if (aControl == iTextListBox &amp;amp;&amp;amp; aEventType == EEventStateChanged)&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// Use the current index to do whatever.&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;TInt current = iTextListBox-&amp;gt;CurrentItemIndex());&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 01 Jun 2005 18:15:59 +0200</pubDate>
 <dc:creator>Andreas</dc:creator>
 <guid isPermaLink="false">comment 19886 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19885</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Now i can handle the PointerEventL. With this code-lines i get a message with item i have clicked:&lt;br /&gt;void CDABDataDecoderAppView::HandlePointerEventL(const TPointerEvent&amp;amp; aPointerEvent)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CCoeControl::HandlePointerEventL(aPointerEvent);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (aPointerEvent.iType==TPointerEvent::EButton1Down &amp;amp;&amp;amp; m_pilboxDataServices-&amp;gt;View() ) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(TInt i = m_pilboxDataServices-&amp;gt;View()-&amp;gt;TopItemIndex(); i &amp;lt;=&amp;nbsp; m_pilboxDataServices-&amp;gt;View()-&amp;gt;BottomItemIndex(); i++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( m_pilboxDataServices-&amp;gt;View()-&amp;gt;ItemIsSelected(i))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TBuf&amp;lt;20&amp;gt; toWrite;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_LIT(KFormat1, &amp;quot;select service %d&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;toWrite.Format(KFormat1,i);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;InfoPrint(toWrite,1);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;But i have always a litte problem... I want only that the InfoPrint was shown, wenn i click on the m_pilboxDataServices. &lt;br /&gt;If i click on the window ,and not in the listbox, the selected item will be printed in the InfoPrint.&lt;br /&gt;How can i check, wether the click was in the listbox or not ?&lt;br /&gt;&lt;br /&gt;Thanks.. Michael&lt;/div&gt;</description>
 <pubDate>Mon, 30 May 2005 14:48:04 +0200</pubDate>
 <dc:creator>ivolein</dc:creator>
 <guid isPermaLink="false">comment 19885 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19884</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;function void ScrollToMakeItemVisible(TInt aItemIndex) const;&lt;br /&gt;&lt;br /&gt;will help you. &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/grin.gif&quot; alt=&quot;Grin&quot; border=&quot;0&quot; /&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 26 May 2005 08:35:56 +0200</pubDate>
 <dc:creator>neobk</dc:creator>
 <guid isPermaLink="false">comment 19884 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19883</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi&lt;br /&gt;&lt;br /&gt;This might be unrelated, but when calling SetCurrentItemIndex on a listbox in a dialog, the item is selected but not scrolled into view. I found a function named SetTopItemIndex, but it didn&amp;#039;t help! My listbox might have a couple of hundreds of rows, and I wanted any of them to be pre-selected and visible when the dialog pops up...&lt;br /&gt;&lt;br /&gt;BR/Linda&lt;/div&gt;</description>
 <pubDate>Wed, 25 May 2005 11:54:16 +0200</pubDate>
 <dc:creator>blond_girl</dc:creator>
 <guid isPermaLink="false">comment 19883 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19882</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;View that contains the instance of class ListBoxHandle must be added in to stack in class AppUi by using :&lt;br /&gt;&lt;br /&gt;function AddToStackL(); &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/grin.gif&quot; alt=&quot;Grin&quot; border=&quot;0&quot; /&gt; like this :AddToStackL( iAppView ); &lt;br /&gt;&lt;br /&gt;and remember put this line in the destructor of class AppUi&lt;br /&gt;&lt;br /&gt;RemoveFromStack( iAppView );&amp;nbsp; &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/rolleyes.gif&quot; alt=&quot;Roll Eyes&quot; border=&quot;0&quot; /&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 25 May 2005 11:28:14 +0200</pubDate>
 <dc:creator>neobk</dc:creator>
 <guid isPermaLink="false">comment 19882 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19881</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;@1... it works now - i have forgotten to set the focus on the list.&lt;br /&gt;&lt;br /&gt;But with problem 2 i have still a problem&lt;br /&gt;&lt;br /&gt;michael&lt;/div&gt;</description>
 <pubDate>Tue, 24 May 2005 22:27:06 +0200</pubDate>
 <dc:creator>ivolein</dc:creator>
 <guid isPermaLink="false">comment 19881 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19880</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hello,&lt;br /&gt;@1:&lt;br /&gt;I add a new item to the CEikTextListBox with this function:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;m_piDataItemTextArray-&amp;gt;AppendL(szDataServiceLabel);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;m_pilboxDataServices-&amp;gt;HandleItemAdditionL();&lt;br /&gt;Now i want to to select this item with:&lt;br /&gt;&amp;nbsp; &amp;nbsp; m_pilboxDataServices-&amp;gt;SetCurrentItemIndex(0);&lt;br /&gt;But this doesn&amp;#039;t work.&lt;br /&gt;&lt;br /&gt;@2:&lt;br /&gt;I have created a subclass called:&amp;quot; class ListBoxHandle : public CEikTextListBox&amp;quot; with the function:&lt;br /&gt;&amp;nbsp;HandlePointerEventL(const TPointerEvent&amp;amp; aPointerEvent)&lt;br /&gt;But this function wasn&amp;#039;t called anyway&lt;br /&gt;&lt;br /&gt;Have you an example for point 1 and 2&lt;br /&gt;&lt;br /&gt;Thanks... Michael&lt;/div&gt;</description>
 <pubDate>Tue, 24 May 2005 15:54:41 +0200</pubDate>
 <dc:creator>ivolein</dc:creator>
 <guid isPermaLink="false">comment 19880 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19879</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote from: neobk&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;2- Why U use HandleCommandL? Build a class derived from CEikTextListBox and handle event in HandlePointerEvent() of this class.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Even more convenient, set your object to be an observer of the CEikTextListBox object and implement HandleListBoxEventL.&lt;/div&gt;</description>
 <pubDate>Tue, 24 May 2005 11:17:09 +0200</pubDate>
 <dc:creator>Andreas</dc:creator>
 <guid isPermaLink="false">comment 19879 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805#comment-19878</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;1- Answer to the first question : U can select an item directly from code by using :&lt;br /&gt;&lt;br /&gt;function&amp;nbsp; &amp;nbsp; &amp;nbsp;: SetCurrentItemIndex()&lt;br /&gt;&lt;br /&gt;prototype&amp;nbsp; &amp;nbsp;: void SetCurrentItemIndex(TInt aItemIndex) const;&lt;br /&gt;&lt;br /&gt;Description&amp;nbsp; : Sets the current item, but does not redraw the list. If the item was not previouly visible it is set to the top item in the view.&lt;br /&gt;&lt;br /&gt;Parameters&amp;nbsp; :TInt aItemIndex&amp;nbsp; Index of the item to make current. &lt;br /&gt;&lt;br /&gt;2- Why U use HandleCommandL? Build a class derived from CEikTextListBox and handle event in HandlePointerEvent() of this class.&lt;br /&gt;&lt;br /&gt; &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/afro.gif&quot; alt=&quot;Afro&quot; border=&quot;0&quot; /&gt;&lt;br /&gt; &lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 24 May 2005 09:44:38 +0200</pubDate>
 <dc:creator>neobk</dc:creator>
 <guid isPermaLink="false">comment 19878 at http://www.newlc.com</guid>
</item>
<item>
 <title>CEikTextListBox ??</title>
 <link>http://www.newlc.com/topic-7805</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/topic-7805&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/topic-7805#comments</comments>
 <category domain="http://www.newlc.com/forums/uiq">UIQ</category>
 <pubDate>Thu, 19 May 2005 14:22:43 +0200</pubDate>
 <dc:creator />
 <guid isPermaLink="false">8397 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
