click or select Clistctrl subitem (report view) - mfc

How can I determine a selected or clicked sub item of a report view Clistctrl?

CListCtrl::SubItemHitTest

Related

Change the slicer state on clicking a button

I have 4 buttons that indicate different ranges and a slicer in my report. I want to change the slicer value according to the button I click.
Is it possible to change the value of the slicer on clicking the button?
You can do this in Power BI by applying bookmarks to slicer and add those bookmarks in action property of buttons. In Power BI Embed you can apply buttonClick event to the button and set the state of slicer but that event will be triggered for all the buttons in the report. Instead of having 4 buttons you can use only one button and set slicer state according to the number of times the button is clicked. To change the state of a slicer on clicking a button in an Embed report, Please find the below code snippet:
Set the Filter config:
const filter = {
$schema: "http://powerbi.com/product/schema#advanced",
target: {
table: "Table_Name",
column: "Column_Name"
},
filterType: models.FilterType.Advanced,
logicalOperator: "And",
conditions: [
// Add condition here as per your requirement
]
};
Get the current active page:
const pages = await report.getPages();
// Retrieve the active page.
let page = pages.filter(function (page) {
return page.isActive;
})[0];
Get all the visuals:
const visuals = await page.getVisuals();
Find the slicer:
let slicer = visuals.filter(function (visual) {
return visual.type === "slicer" && visual.name === "Visual_Name";
})[0];
Add the button click event and set the state of slicer:
report.on("buttonClicked", function (event) {
slicer.setSlicerState({ filters: [filter] });
});
Pleaser find references here:
https://learn.microsoft.com/javascript/api/overview/powerbi/handle-events#buttonclicked
https://learn.microsoft.com/javascript/api/overview/powerbi/control-report-slicers#set-slicer-state
Make 4 copy of slicer and select different value in each slicer. Now select the Bookmark and selection pane from ribbon and hide all 3 slicer and keep one visible. And then select the property of the button and in Action , choose Bookmark and name of bookmark created above.
Same thing you need to do for other 3 buttons. Each time selecting a new slicer.

Expand or collapse navigation pane in Power BI Report

I have implemented the navigation pane feature in Power BI report as shown below. I like to expand or collapse this navigation pane to utilize page for visuals.
Is there any visuals/tricks to do this?
You can save your report/page layout as a bookmark (Menue Bar > View > Bookmarks Pane) with the navigation pane visible (NavigationVisibleBookmark).
You can trigger visuals visible/invisible with the eye symbol in the selection pane (Menue Bar > Views > Selection Pane`).
Then save another bookmark with the navigation pane invisible (NavigationInvisibleBookmark).
Now you can trigger the two different bookmarks with a button for example. Add a blank button and go to the Properties > Action and choose Type = Bookmark and Bookmark = NavigationVisibleBookmark.

How to perform partial refresh of page in APEX5.0

I have an APEX page where it contains multiple regions. Each region has its own drop down list (Select list) item and a bar chart. My problem is from any particular region when I select a value from the drop down list, the whole page is refreshed as I have the option Submit page set for Page Action on Selection property.
How do I perform partial refresh so that during the selection from drop down list only the bar chart for that region should be refresh and not the entire page?
Go on your select list item and change the Page Action on Selection property from Submit Page to None. Then create a dynamic action on page with the following options:
Event=Change
Selected Type=Items
Item=Your select list item
Action=Refresh
Selection Type=Region
Region=Your bar chart
Same as answer above with one trick to make it work. The value in your select list has not been submitted so will be null and not work.
Add another Dynamic action that runs before the refresh one of type PLSQL. set the code to null; then add your select list to the "items to submit".
Should work now :)

Finder column view modify width of active column

Is there a way in any language written for OSX (Applescript, C++, etc.) where
I can access the function (adjust column width) in the context menu, when you right
click on the two lines at the bottom of the Scrollbar in Finders Column
View (AXMenu->AXMenuItem)?
Same happens if you double click on the two lines.
Because what I want to do is somehow get a shortcut on this function for "super-fast-
finder-workflows".
From the Finder Applescript Library:
column view options: the column view options
properties
text size (integer) : the size of the text displayed in the column view
shows icon (boolean) : displays an icon next to the label in column view
shows icon preview (boolean) : displays a preview of the item in column view
shows preview column (boolean) : displays the preview column in column view
discloses preview pane (boolean) : discloses the preview pane of the preview column in column view
It doesn't look like Applescript contains a way to access the settings you are looking for

Adding a drop-down menu button to a CMFCToolbar

I'm trying to add a menu to a CMFCToolbar. Following advice I found online, I'm doing it like this:
CMenu m_Menu;
m_Menu.LoadMenu(IDR_MYMENU);
m_Toolbar.ReplaceButton ( ID_DOTHISWHENCLICKED,
CMFCToolBarMenuButton( ID_DOTHISWHENCLICKED,
m_Menu,
10,
nullptr,
FALSE));
So the above gives me a button with a drop-down arrow. When I click the button, it does the action ID_DOTHISWHENCLICKED. When I click the drop-down arrow, I get a menu with one item in it. The item is the title of IDR_MYMENU and this has a sub-menu that is the menu I would like to be displayed. Something like this:
[BUTTON]
My Menu
Submenu Item 1
Submenu Item 2
Submenu Item 3
Obviously what I want to see is:
[BUTTON]
Submenu Item 1
Submenu Item 2
Submenu Item 3
So my question is.... why aren't all of the menu items in IDR_MYMENU in the menu, instead of being in a sub-menu off of it?
Thanks.
This problem is fixed simply by passing in .GetSubMenu(0)->GetSafeHmenu(), instead of the CMenu in question, when creating the menu button. Why this should be so is a complete mystery to me, and one of those MFC'isms that you know if you know.
Not sure whether to delete this question or tick it solved in case anyone else ever has this issue.