MFC feature pack - dockable file explorer and dockable properties window - 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 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.

Related

Chrome Extension Context Menu Items Limit

Although the docs are pointing out:
The maximum number of items that can be added to the top-level browser action context menu is menus.ACTION_MENU_TOP_LEVEL_LIMIT, but you can add any number of items to submenus.
I am only able to add 1000 submenu items to the Chrome Extension context menu.
I don't want to create a UI additionally, because the context menu is really handy for my use case. The user is working in a code editor and can look up code syntax string values via the context menu and can add the value at the position of the cursor where the user right-clicked.
Do you know of such limitations or a workaround besides using an additional UI element?

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:

Why can't Acumatica find a view?

I created a DAC extension mapped to an extension table off of SOShipment. I have two custom fields in the extension table that I'd like to add to the Sales Orders entry form, specifically the grid in the Shipments tab. When I go to the layout editor for this form and select the Grid: ShipmentList under the Shipments tab, there are no fields in the Add Data Fields tab on the right. Also, I see a yellow circle with this error in several places:
The "ShipmentList" view is not found. Try to publish the customization project.
I published the customization project, but the error persists. To my knowledge, we haven't done any customization that would've touched the ShipmentList view. What is the issue here and how do I resolve it?
Since you are trying to add those Custom fields to the Grid: ShipmentList(which primary DAC is SOOrderShipment), make sure you add the Custom Fields to the Correct DAC extension, the correct DAC extension should be for SOOrderShipment.
(You have to rename the DataView because in base code, this Dataview is named shipmentList. However, the editor Tool when generating Customization Script for that screen is assigning ShipmentList(Capital S) to Datamember instead of correct Dataview name. )
So, then Go to Section Screen, Select SO301000 screen, select the Grid(ShipmentList) under the Shipments Tab, select Action->Edit ASPX, then locate on DataMember="ShipmentList" (with Capital S) and replace it for DataMember="shipmentList" (lowercase s). Then click on "Generate Customization Script" and publish your Customization.
After publishing, go to SO30100 Screen, select correct Grid and you will be able to see new Custom Fields and the warning message gone.

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.

MFC feature pack - how to update the property grid control

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!

Resources