Skip to main content
Known Participant
November 29, 2007
Question

how to add text dynamically in Tree view list box

  • November 29, 2007
  • 1 reply
  • 1196 views
CS3/WIN<br />hi,<br />I am new in plugin development.<br />I have a Tree View List box on a dialog.<br />b I don't want to display text when i load the plugin.<br />b I want to insert text data when i click on "Insert" button on dialog. <br />I have defined Adapter,Mgr,Observer for list box.it is working fine when i want to display data at loading time itself.but not when i click on insert button.<br />b In dialog observer i have defined this but it is not working<br /><br />b Dialog Observer::Update<br /><br />InterfacePtr<IPanelControlData> panelControlData(this, UseDefaultIID());<br />IControlView* Grid = panelControlData->FindWidget(kESSGridTVWidgetID);<br />InterfacePtr<IStringListControlData> listControlData(Grid,UseDefaultIID());<br />if (theSelectedWidget == kESSInsertButtonWidgetID && theChange == kTrueStateMessage) <br />{<br />listControlData->AddString(strText,kESSListBoxTextWidgetID); <br />}<br /><br />b it is showing error <br />b operator new returning nil for an allocation size of 486022320 bytes<br />(..\..\..\source\components\memoryallocator\PMNew.cpp (552))<br />b Memory allocation failure<br />(c:\development\cobalt\source\public\includes\K2Allocator.h (131))<br />can any one help to get this..<br />Thanks.
This topic has been closed for replies.

1 reply

Known Participant
December 7, 2007
I got it That is working fine.I am missing a call to treeMgr->NodeAdded(node) after each node creations.
August 6, 2009

How to populate list in tree view  dynamically


Hi,


I am new to  Indesign Plugin creation.


I want to create list in tree view dynamically.


I tried wlistboxcomposite sdk sample in indesign cs4.


I have some doubts in this.


1. Can i write my own method in  WLBCmpTreeViewAdapter class because it's implements ListTreeViewAdapter


If it's possible how can i call this method.


2. In this example they populating static string in constructor like this


WLBCmpTreeViewAdapter::WLBCmpTreeViewAdapter(IPMUnknown* boss):ListTreeViewAdapter(boss){


K2Vector<PMString> lists;



for (int32 i = 0; i< 12; i++){
PMString name(kWLBCmpItemBaseKey);name.AppendNumber(i+1);name.Translate();lists.push_bac k(name);}

InterfacePtr<IStringListData> iListData(

this, IID_ISTRINGLISTDATA);}


and this list is populating on loading time but my requirement is i have one button "get list" after clicking this button i have to populate the list, how can

i achieve this.


Pls do needful.


Thanks

Arun

Known Participant
February 11, 2014

Hi Arun,

I hope u have implemented this method in your plug-in. now i am trying this way(add text dynamically in treeview list box). can you please help me to complete this..

Thanks,

Vimala L