address book

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Raghu
Experienced Solver
Experienced Solver
Posts: 79
Joined: Wed Oct 19, 2005 11:33 am

address book

Post by Raghu » Thu Mar 02, 2006 12:57 pm

Whats the best way of implementing Address book kind of feature in wxwidgets. I mean something like phone book.

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Thu Mar 02, 2006 1:12 pm

Hmmm...
Do you mean graphically (e.g. what controls to use for best visuals), or the logic for storing the data?
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

Raghu
Experienced Solver
Experienced Solver
Posts: 79
Joined: Wed Oct 19, 2005 11:33 am

Post by Raghu » Thu Mar 02, 2006 1:19 pm

Graphical view. There r some classes associated with grids like GridCellEditor and like. Will those be useful.
I want to display a list of strings among which user has to choose. The associated value with the choosed text should be displayed in some text box. And user must be able to add new contacts to the list. Just like a typical phone book.

And storage should be file(for persistance).

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Thu Mar 02, 2006 1:49 pm

Raghu wrote:Graphical view. There r some classes associated with grids like GridCellEditor and like. Will those be useful.
I want to display a list of strings among which user has to choose. The associated value with the choosed text should be displayed in some text box. And user must be able to add new contacts to the list. Just like a typical phone book.

And storage should be file(for persistance).
Then why not use a wxListCtrl for displaying the entries and upon selection, use wxTextCtrls to display/edit the values...
For data storage, I'd either do it using XML or with a small DB like SQLite.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Fri Mar 03, 2006 6:46 am

Then why not use a wxListCtrl for displaying the entries and upon selection, use wxTextCtrls to display/edit the values...
For data storage, I'd either do it using XML or with a small DB like SQLite.
I would go for some custom control that displays the name, and on clicking them expands to show the whole details, like in Skype with Yahoo type search button at the top. And to store the address, would use VCARD format.

Raghu
Experienced Solver
Experienced Solver
Posts: 79
Joined: Wed Oct 19, 2005 11:33 am

Post by Raghu » Mon Mar 06, 2006 5:30 am

Is there any specific class for implementing address book in wxWidgets? or do we need to use wxFrame for that.

Ryan Wilcox
I live to help wx-kind
I live to help wx-kind
Posts: 194
Joined: Mon Aug 30, 2004 1:26 pm
Location: PA, USA
Contact:

Post by Ryan Wilcox » Mon Mar 06, 2006 3:02 pm

Correct. There is no, say, wxAddressBookWindow. You'll have to select what controls you want, and position them with sizers inside a wxFrame.
Ryan Wilcox
Wilcox Development Solutions
http://www.wilcoxd.com

Post Reply