toolbar buttons |
Post Reply |
Author | |
gdlindo
Newbie Joined: 31 October 2003 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 31 October 2003 at 10:54am |
I'm trying to add my own buttons to a property grid toolbar. I'm using version 8.0. How can I change the existing property grid toolbar, or use my own?
|
|
kstowell
Admin Group Joined: 25 January 2003 Location: MIchigan, USA Status: Offline Points: 496 |
Post Options
Thanks(0)
|
Hello, Take a look at the GUI_VisualStudio7 sample in the GUI_samples directory that comes with Xtreme Toolkit Pro. If you do not have Xtreme Toolkit Pro, you can download the evaluation version which comes with the sample. Cheers, |
|
gdlindo
Newbie Joined: 31 October 2003 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Thanks for the reply, but I'm either still not getting it or not doing a good job of explaining my problem. Take for example the Properties Window in the MS Visual Studio .NET IDE. It has a property grid with a toolbar. The toolbar has the default buttons for arranging the grid categorized or alphabetic. The ShowToolBar() function in your library does the same. However, the MS Properties Window toolbar also has buttons for Properties, Events, Messages, etc. That's what I need to do - add more buttons to the toolbar. If I could replace the toolbar entirely with one of my own, that would work also, but I need more functionality than just the two default sort buttons. I hope this is a clearer explanation of my problem.
|
|
kstowell
Admin Group Joined: 25 January 2003 Location: MIchigan, USA Status: Offline Points: 496 |
Post Options
Thanks(0)
|
Hello, Which version do you need help with MFC, ActiveX or .NET? Thanks, |
|
gdlindo
Newbie Joined: 31 October 2003 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
|
MFC, thanks.
|
|
kstowell
Admin Group Joined: 25 January 2003 Location: MIchigan, USA Status: Offline Points: 496 |
Post Options
Thanks(0)
|
Hello, I have attached a sample project that illustrates how to do this. You may need to change the stdafx.h for either Xtreme Suite or Xtreme Toolkit Pro, for example: Add the following line to your StdAfx.h file: Xtreme Toolkit Pro users: #include <XTToolkitPro.h> // Xtreme Toolkit Pro components Xtreme Suite users: #include <XTSuitePro.h> // Xtreme Suite components Let me know if this helps! Cheers, Download: 34D_PropertyGridSample.zip |
|
ddyer
Groupie Joined: 01 December 2003 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
|
Ok so basically the propertygrid doesn't support user-added buttons per-se. You just don't use the propertygrid toolbar and create/manage your own toolbar. You should clarify that on the propertygrid web page. |
|
Russ
Groupie Joined: 21 September 2003 Location: Russian Federation Status: Offline Points: 28 |
Post Options
Thanks(0)
|
Well I was looking for the same solution too.. Was quite puzzled with GetToolBar button method at first. What this might be used for? Thanks.
|
|
cbatt
Newbie Joined: 24 April 2006 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
I'm new to toolbars. Basically, I have a property grid in a
dialog box (part of a wizard) and I want to customize the
toolbar. I followed the sample posted as closely as possible but
the toolbar is not displayed. I only have a license to the
property grid, so I don't think I have CXTPToolBar, so I'm using MFC
CToolBar instead. Code looks like:
virtual BOOL OnInitDialog() { CPropertyPage::OnInitDialog(); CRect rc; m_placeholder.GetWindowRect( &rc ); ScreenToClient( &rc ); if ( m_pgrid.Create( rc, this, IDC_PROPERTY_GRID ) ) { &nbs p; m_pgrid.ShowHelp( FALSE ); // Create grid items... } if( m_toolbar.Create( &m_pgrid, WS_TABSTOP|WS_VISIBLE|WS_CHILD|CBRS_TOOLTIPS ) ) { &nbs p; m_toolbar.LoadToolBar( IDR_TOOLBAR_GRID ); } return 1; // Let the system set the focus } The toolbar is created and loaded successfully, but doesn't show up in the property grid window. Obviously, I'm missing something important... any help would be appreciated. |
|
cbatt
Newbie Joined: 24 April 2006 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
So, I guess to answer my own question, I just put a toolbar on the
property page and turned off the property grid's toolbar. Its
unfortunate that the property grid's toolbar can't be more easily
customized.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |