Python + GTK - Scrolled menu bugged - linux

Basically, when we click on a combobox near to the bottom edge of the screen, the first item of the menu begins at the same vertical position of the combobox, leaving a blank space on top of this.
This way the menu is created with the size to hold all the menu items, but since the first element of these is not put at the top of the menu, the menu has to scroll to see them.
Link to the image: http://postimg.org/image/767ukjphz/
It's not a bug in my code. The menu is created correctly. The bug is in the GTK libraries.
So, what do you suggest me?, how can I resolve this situation?, maybe moving to menu position?

Related

Collapsible QDockWidget when clicking on the tab

I am trying to mimic the behaviour on PyCharm, where there are docks on the edges and, if the user clicks on the tab, it exapnds and collapses the dock to increase the central widget.
I managed to put the tabs on the site, and I can subscribe to the tabBarClicked event to detect QDockWidgets, but I still need to figure out 2 problems:
How to always display a tab on each region where there is a dock (if there is more than 1 dock on that area, the tabs are automatically handled, but if there is only 1 dockwidget, no tabs are shown).
How to keep the tab if I hide the dock (for collapsing the widget).
Any ideas? This is what I got so far. As you can see, the QDockWidget on the bottom does not have a tab, but a title bar.

Word - How to stick text to the bottom of page

https://SURU.tinytake.com/sf/MTQxMTgzOV81MDc2MDI2
I want to stick some text of the bottom of the page, like on the screen, just before footer always. When there is text (from mergefield), next should be new lines. I hope screenshot make it easier to see.
You can put the text in a text box or frame with position set to "Bottom
Relative to Margin". It's the only idea I have due you don't want to use a footer.
Or you can see this article
Basically it gives three options:
Negative left indent
Margin text box
Anchor to the header
I found the solution to the problem on Microsoft's page and I hope that this page comes up for as many people as possible.
Select the text you want to stick to the bottom (or top) of the page. Under Layout tab take a look at the bottom right of the page layout section and you should see a small arrow that, when clicked on, opens a new menu. In that menu, go to layout tab and set vertical alignment to be "bottom". IMPORTANT! Make sue that the next menu option (at the bottom of that window) is set to "apply to selected sections" otherwise, you will be writing from the bottom of the page upwards.
Here is the source image that helped me. https://filestore.community.support.microsoft.com/api/images/0382c4a8-ade9-4fc4-be66-bcd2c7101479?upload=true
Here is the visual representation:
Note that the person who took the screenshot set the last setting to whole document, not just selected sections.
If selected sections option isn't available, make sure you selected a text before opening the menu.
Hope this helps!

Excel/VBA - Set Focus and Scroll to Control

I'm looping through the ActiveX controls on my spreadsheet to implement tab control. I have around 100 controls in my spreadsheet, so not everything fits on a single "page" (it's all in the same tab, you just have to scroll down.)
I can use Activate to set the focus to the next control. However, when I tab through the controls and pass the bottom of the viewable window, the window doesn't automatically scroll to show the control with focus.
Is there a way to get the spreadsheet to scroll so that the control that has focus is actually on the screen?
Sorceri nailed it right on the head. I used Window.ScrollRow to scroll down the page after I set the focus. The only issue is that this sets the bottom of the row to the top of the window, so it's just off screen. I was able to resolve this by specifying:
ActiveWindow.ScrollRow = row-3
Thanks!

how to prevent vertical scroll bar in an owner drawn combo box when only 3 items exists?

I sub-classed a combo-box control to make text vertically centred. Issue here is I am getting a vertical scroll bar when only 3 or 4 items exists in the combo-box that too when I expand the control for the first time, where a vertical scroll is not required.
Control property had been set as follows.
COMBOBOX IDC_COMBOBOX,28,45,205,65,CBS_DROPDOWNLIST | CBS_OWNERDRAWNFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP.
When I removed WS_VSCROLL vertical scroll bar is not coming. But if I remove this property I will not get a scroll bar when too many items exists in the combobox, where actually a scroll is required.
Please find the below Images for your reference how the control is behaving.
Run the MFC application.
Expand the combobox.
Again try expanding the combo box issue is not reproducing. It's happening only
for the very first time when expand the control.
I could not figure out why this issue is happening. I tried removing the existing control and again I tried adding new controls expecting whether it could bring any change in the behaviour but no luck.
Item height is set to 30 as below.
m_ComboBox.SetItemHeight(-1, 30);
And I had two combobox controls in my properysheet application as shown in the image.
Any help is appreciated.

Navbar items change color depending on their current position

I would like to do the same thing with my navbar for my school website project - check this page out as reference - http://www.sketchin.ch/ when you scroll, the hole navbar changes its color.
is this canvas used? Please, I really, really need help with this! Any ideas will be greatly appreciated.
Basically, there are two different menus. The video header at the top is a higher z-index than the black menu. As you scroll down, this menu then comes into view.
Both menus are the same fixed position as each other. The white menu is inside of that first section, which has overflow set to hidden. This means that as you scroll down, the white menu is fixed and so goes out of the header section, so it becomes hidden, and the other menu appears from below the first section because it too is fixed position..

Resources