Diff: wxTreeItemData & wxTreeItemID

wxWindows

    Next

  • 1. Compiling for iPAQ, familiar
    Hi I'm currently trying to compile an aplication using wxWidgets for iPAQ, running the Familiar linux dist. I would like help, like links for tutorials or a running "hello-world" program. Thanks Pedro Manoel Hi<br> <br> I'm currently trying to compile an aplication using wxWidgets for iPAQ, running the Familiar linux dist.<br> I would like help, like links for tutorials or a running "hello-world" program.<br> <br> Thanks<br> <br> Pedro Manoel<br>
  • 2. wxRadioBox crash
    Hi. I am trying to use wxRadioBox for the first time in a existing wxWidgets 2.4.2 application ( cross-compiled for MSW under linux ). But the wxRadioBox constructor crashes the program. Have I missed something or is this a bug or ... This is the code that crashes: --------------------- const wxString rb_plotoptions_choices[] = { wxT("option 1"), wxT("option 2"), wxT("option 3") }; rbox = new wxRadioBox(this, ID_OPTIONS, wxT("When plot job completes"), wxDefaultPosition,wxDefaultSize, 3, rb_plotoptions_choices, 3, wxRA_SPECIFY_ROWS); -------------------- in the header file is defined: wxRadioBox* rbox; Thanks for any suggestions. - Kristian --------------------------------------------------------------------- To unsubscribe, e-mail: XXXX@XXXXX.COM For additional commands, e-mail: XXXX@XXXXX.COM
  • 3. wxForum News
    Hi All, I have called with my hosting company and they reset my permissions. The forum is now back online, but I disabled it for the time being. Their reason why it was taken offline was no crash, but the cause of a heavy load. I think this is now resolved, but to make sure they won't pull the plug again I disabled the board. The disabling of the forum has another reason as well. Yesterday I agreed upon Jason Sheets generous offer to host the forum for us. So to prevent people to post messages again, I disabled it so the DB can be transferred this afternoon. It should be a painless transformation as the PHPBB code is all that needs to be transferred, and the DB (I could salvage the most up to date version so nothing is lost). I came to this decision after viewing the stats of my forum .. I already used 7,5 Gb bandwidth per month of the 10 Gb max I have. So eventually the move would be necessary anyway. When the move is all completed this afternoon, I will put a redirection tag on my current account, and announce the forum's new IP address. Thanks everybody for the support and the offers to help out! It really makes me feel the wxForum is a great asset to the wxWidgets community, and is really missed when it would be dissapearing. With regards, - Jorgen --------------------------------------------------------------------- To unsubscribe, e-mail: XXXX@XXXXX.COM For additional commands, e-mail: XXXX@XXXXX.COM

Diff: wxTreeItemData & wxTreeItemID

Postby prasanna » Fri, 31 Aug 2007 16:31:43 GMT

Hi,

I'm new to wxWidgets.
Can anyone tell what is  the difference between wxTreeData and wxTreeItemID.

I have to develop one treectrl like this.

 ROOT
   CHILD1
	CHILD1.1
	CHILD1.2
   CHILD2
   CHILD3

Can anyone please tell what is the procedure to do that or which methods I
have to use
to accomplish my task.

Regards,
Prasanna.



The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

Contact your Administrator for further information.

---------------------------------------------------------------------
To unsubscribe, e-mail:  XXXX@XXXXX.COM 
For additional commands, e-mail:  XXXX@XXXXX.COM 


Re: Diff: wxTreeItemData & wxTreeItemID

Postby Ondra Holub » Fri, 31 Aug 2007 20:55:32 GMT



wxTreeItemID is some identification of item in wxTreeCtrl.
wxTreeData is parent class of any user data which may be associated by
user with certain wxTreeCtrl item.


wxTreeCtrl* tree = new wxtreeCtrl(parent, -1);
wxTreeItemId root = tree->AddRoot(_("ROOT"));
wxTreeItemId child1 = tree->AppendItem(root, _("CHILD1"));
wxTreeItemId child11 = tree->AppendItem(child1, _("CHILD1.1"));
wxTreeItemId child12 = tree->AppendItem(child1, _("CHILD1.2"));
wxTreeItemId child2 = tree->AppendItem(root, _("CHILD2"));
wxTreeItemId child3 = tree->AppendItem(root, _("CHILD3"));


Similar Threads:

1.file name with diff country code in diff OS

Dear all

Can anyone tell why I store a file to Windows 2000 server, ((which is in Chinese character)), cannot be read in Macintosh platform

Thank you very much!

2.Diff Perf Diff User?

3.wxTreeItemData::GetId() does not work

A little more experimenting I found that the following sequence:

    itemId = m_treeCtrl->AppendItem(parentId, name, itemData->GetNormalIcon());
    m_treeCtrl->SetItemData(itemId, itemData);

does not associate the wxTreeItemData object with the wxTreeItemId. 
Changing it to:

    itemId = m_treeCtrl->AppendItem(parentId, name, itemData->GetNormalIcon(),
-1, itemData);

does the association, but GetId() will ONLY work when called during
a tree event.  I still can't call GetId() at some arbitrary time
to get a valid wxTreeItemId.

Any thoughts???


Will






Will Bene wrote:
> 
> Given a subclass of wxTreeItemData, I want to select the corresponding
> tree item by calling wxTreeItemData::GetId() and using that id to call
> wxTreeCtrl::SelectItem().  This does not work.  The GetId() returns a
> bogus value (a constant value for the wxTreeItemId::m_pItem member
> even for different wxTreeItemData objects.)
> 
> Thinking that this call might only be set on tree events, I checked the
> value of the GetId() call during a selection change event.  This value
> is always 0.  Not what I expected.
> 
> Is this a bug or is this feature not intended to be used this way?
> 
> (running wxGTK 2.4.2 under Linux).
> 
> Thanks,
> 
> Will
> 
> --
> 
> =============================================================================
>  William J. Bene                                       XXXX@XXXXX.COM 
> 
>  Mail Stop 125                               ANALYTICAL MECHANICS ASSOCIATES
>  15 Langley Boulevard             Assigned to Data Analysis & Imaging Branch
>  NASA Langley Research Center                       Building 1268, Room 1057
>  Hampton, VA  23681-2199                               Phone +1 757 864-2106
> 
> =============================================================================

-- 

=============================================================================
 William J. Bene                                       XXXX@XXXXX.COM 

 Mail Stop 125                               ANALYTICAL MECHANICS ASSOCIATES
 15 Langley Boulevard             Assigned to Data Analysis & Imaging Branch
 NASA Langley Research Center                       Building 1268, Room 1057 
 Hampton, VA  23681-2199                               Phone +1 757 864-2106

=============================================================================

---------------------------------------------------------------------
To unsubscribe, e-mail:  XXXX@XXXXX.COM 
For additional commands, e-mail:  XXXX@XXXXX.COM 

4.wxTreeItemData sample

5.wxTreeItemData

Hi

I have this code:

device_treectrl->AppendItem(tree_root_id,device_vector[i].Name,-1,-1,new
wxTreeItemData(device_vector[i]));

where device_vector is a stl vector

Later when I try and get the item back 

ESPDeviceInfoStruct *device_info = (ESPDeviceInfoStruct *)
device_treectrl->GetItemData(tree_item_id);

I get another pointer !

Can someone tell me what I have wrong ?

Thanks

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail:  XXXX@XXXXX.COM 
For additional commands, e-mail:  XXXX@XXXXX.COM 

6. Re[2]: wxTreeItemData::GetId() does not work

7. 'wxTreeItemData' : base class undefined

8. Needed: int wxTreeItemId::GetHash()



Return to wxWindows

 

Who is online

Users browsing this forum: No registered users and 5 guest