MFC feature pack - how to update the property grid control - visual-c++

I'm new to MFC and is a bit confused with the new features of "MFC feature pack." Through the wizard I now have an application that looks like an IDE - has a dockable file explorer on the left side and a dockable properties window on the right side. I'm able to get the selected items on the file explorer window through ON_WM_LBUTTONDBLCLK and GetItemText().
Question:
Properties window should be "updated" after clicking an item in the file explorer window. Ex. I click an item "button" in the tree control, properties window should show "image", "font", and "color" How can I do that? How do you update the contents of the propertygridCtrl?

To fill the property grid, look at the wizard-generated content. You'd set up a handler for the 'item button' clicked event, clear the grid content, fill it again. Seems an obvious answer so maybe I misunderstood the question.

I don't understand where is your difficulty. Just have a class derived from CMFCPropertyGrid, add a public member function on it to Update its data, having one parameter. Call that function from the file explorer window, having the selected element as the parameter.
Maybe you are choosing the wrong to handle the fact of the user is changing the selected item? I don't know what class is your "file explorer" control, but I suggest you to use something to do with "Item changed" instead of "Click" or "LButton", as the selected item can change by other means, namely arrow keys!

Related

Extending the "Files" menu

I have a process that involves extending the "Files" menu that is located on (most) acumatica pages (next to notes and activities in the top right)
I would like to add two columns to the table that appears in the smartpanel.
I have been looking for the source code/data behind this smart panel and I cant seem to find it, is it tied into SM202520 (search in files)? Can it be extended?
Am I better off just adding a PXAction button to the 3 or 4 pages I want my extended "files" menu to be?
Thanks
There's no DataView bound to that dialog, you can verify that by using inspect element shortcut key CTL+ALT+CLICK on a grid column header:
In order to be customized the grid needs to be bound to a DataView which inspect element reveals it is not. The lack of DataView binding is by design and therefore that dialog can't be customized.
A grid that can be customized will show the View Name property:

TestComplete Menu Item

I am new to TestComplete. I have a question and it may be something impossible or too simple. I have a toolbar containg File, Edit, View, etc. I want to get one item (eg. Edit) to mapped objects. I can get the whole toolbar only. I want to simulate a click event on Edit. How can I do this?
As a rule, TestComplete does not work with menu items as with separate objects. It works with a menu object or even only with a menu's parent object and you can specify which item to select by passing the caption of this item to the corresponding method of a menu object. For example:
objMenu.Click("Edit|Paste");
// or
parent.MainMenu("Edit|Paste");
Please find more details on how TestComplete interacts with menus in the Working With Menus help topic.

nsoutlineview: right click without invoke "selection did change" delegate method

as the official "DragNDropOutlineView" sample project,
if i have already selected an item,clicked right button for menu,the right clicked item
will be selected & marked with a blue border,but selectionDidChange method was not invoked.
how did it implement?![enter image description here][1]
answer the question myself,
we can not implement this by coding, instead, we can create a menu in the interface builder, choose the table view or outline view, link the "menu" outlet to the menu you created just now.
now when you right click the item , it won't invoke the selectionDidChange notification.

Hide CRM form left hand side navigation item

I have my account entity linked to a custom entity called inspections, I only want these inspections to be created for accounts of a certain type. So when it isn't that type I want the left hand navigation to this entity to be hidden away. I've seen some code that says will hide it away, as long as you have the navID of the item.
I've had a crack at hiding it using what i thought could be the ID but it hasn't worked, so I'm wondering if anyone knows how to get this ID, or if there is another way to do this?
The code I'm using to hide the navigation is below:
var navitem = Xrm.Page.ui.navigation.items.get("nav_ts_inspection");
if (navitem != null)
{
navitem.setVisible(false);
}
Load the form
Press F12 to show IE Developer's Toolbar
From here you can use CTRL+F to search for the display name of the item you'd like to hide. This will give you a link that is generated. The Id of this element is what you need to use to show/hide the link.
As an example, you can see results of searching for 'Sub Accounts' on the Account screen for an installation I am working on at the moment. The Id can be seen and is 'navSubAct'
Changes by traversing DOM and manually hide an area is not officially supported.
Luckily if you are on CRM 2011, you can go to
Settings > Customization Or open the solution.
Select the entity > Forms. Inside the Form editor window, open the Form Properties of the entity.
Go to Display Tab and untick "Show navigation items" checkbox.
Finally do not forget to Publish your changes.
Use the relationshipname to hide folder in navigation like this:
If you have folder with the relationship name: ts_inspection
Use this for ID: navts_inspection
So otherwise the same as above, but lose the extra underscore (_) between nav and ts.
var navitem = Xrm.Page.ui.navigation.items.get("navts_inspection");
If you want to hide particular navigation section from the FORM then remove all the links from that section and publish it. That section will not be visible anymore.
If you want to just remove Navigation Pane from FORM, then go to 'Display' tab of form and mark as 'Do Not Show' and then publish it.

MFC feature pack - dockable file explorer and dockable properties window

I'm new to MFC and is a bit confused with the new features of "MFC feature pack." Through the wizard I now have an application that looks like an IDE - has a dockable file explorer on the left side and a dockable properties window on the right side. I'm already able to get the selected items on the file explorer window through ON_WM_LBUTTONDBLCLK and GetItemText().
Question:
Properties window should be "updated" after clicking an item in the file explorer window. Ex. I click an item "button" in the tree control, properties window should show "image", "font", and "color" How can I do that?
The tree view should have the handle of the properties window. Getting the string name of the tree item is pretty basic so it's better to set data to each of your tree item (SetData()). This way, you're not just getting the name of the tree item, but also the data of the tree item.
Everytime you click a tree item, pass the data that has been set from the tree item to the properties window. By extracting the data you passed, you can dynamically generate the contents of the properties window.

Resources