I have seen questions asking if they can remove the maximize button, but I want to ask if it is possible to remove/disable the close button?
The answer is the same as the answer in the question you linked to. Only a slight change is necessary.
self.setWindowFlag(QtCore.Qt.WindowCloseButtonHint, False)
The CustomizeWindowHint flag needs to be set first before the WindowCloseButtonHint flag can be changed.
See https://stackoverflow.com/a/27496734
Related
This is a question with the same title as here:
VBA Active-X buttons getting bigger with every action
I guess the problem is the same.
The question is nevertheless from 2014!!! and it does not really have an answer.
In my case the buttons were NOT created programatically, but just clicking in insert activeX control, button, and then click for writing the VBA behind.
In order to better illustrate the problem I made a video with my handy:
https://www.youtube.com/watch?v=hBiu2FfRxQU
IN the video you can see how every time a button is clicked it gets bigger.
as note aside I have to say that this only happens when I connect remotely with my computer via a think client. Nevertheless both screens are the same (i.e. have the same resolution).
This is of course very annoying because it makes almost impossible to use home working since connecting to my excel at work makes all the buttons go crazy in size.
As #TimStack and #jvdv has pointed out this is a known issue of Microsoft, i.e. a BUG, there since many years.
Hence there is no solution but workarounds.
So stay away from controlX if you don't want to get surprises.
I had faced this issue today itself. And found very strange solution to this problem.
I just tried to resize the button where I was facing the issue and it was solved.
Hope this works with you.
My issue is posted on below link
https://github.com/ether/etherpad-lite/issues/2231
if anyone have solution then plz give ans.
click on below link to get answer.
I made one plugin which disable the init time focus.
https://github.com/odoo/odoo/tree/master/addons/pad/static/plugin/ep_disable_init_focus
Is this possible at all? When I create a form using MonoTouch.Dialog, it comes automatically with the "next" button, but that jumps to the last input in the form. Is this a bug, or is it because I have to set a tabindex of sorts to make it work?
It should jump to the next input line, is that not the behavior that you are experiencing?
A test case would shed some light.
Ah, I found the answer on github. My bad, I should've looked more thoroughly there first. On the GetCell of the EntryElement, inside the entry.ShouldReturn foreach-loop, you need to break after setting focus to the next input.
https://github.com/SuperYeti/MonoTouch.Dialog/blob/master/MonoTouch.Dialog/Elements.cs#L1096
I want to move all the private fields in a class to the top or at least to a block where they are gathered together.
Is there any quick way to achieve this with ReSharper?
You want the feature called Cleanup Code.
You can access it via
CTRL+ALT+F, according to my keyboard shortcuts, or
the window menu Resharper | Code | Cleanup code...
Ensure that your profile has the option Reorder members selected. If you want to change the way that the reordering works, you can, but it's a little involved.
You can also apply this across an entire project or the entire solution by right-clicking at the appropriate level in solution explorer and choosing the Cleanup Code... option from there.
I answered a similar question here. It's for putting them at the bottom, but should be enough information to get you set up too.
Have you tried the Clean code options?
I believe you can set the behaviour there.
Kindness,
Dan
while designing my user control, i encountered the following problem:
i would like to set the UserControl.CanGetFocus to false, which is not possible due an error message telling me that a control unable to receive focus can not contain elements who are able to receive focus.
but as i don't want them to actually receive any focus, i would like to disable this for the child-objects as well as for my user control. i can barely believe that there's no possiblity to prevent the child-controls to receive focus, no matter of what type they are? i currently use imageboxes and pictureboxes.
already searched using google, always leading to the result that the property cannot be set to false under these conditions...
If you put the picturebox in a frame and the disable the frame then it will not receive mouse events. Doing this in combination with setting the tabstop to false will prevent the picturebox from receiving focus.
I've used this technique in the past to create a checkbox usercontrol that can be made read-only.
You can set the TabStop property of the childcontrol to False.
Have you tried just using Image controls? If I recall correctly they're lightweight and shouldn't capture focus, whereas a PictureBox is always going to be able (in theory) to capture focus. Depending on your need, this may be sufficient.
Can you set an enabled property to false?
You might want to look at this article.
http://support.microsoft.com/kb/180216
Sounds like you have a problem. The only known workaround is to set the UserControl's Enabled property to False instead of setting the CanGetFocus property. But then, of course you would not be able to respond to clicks and things.
It's been a while, but the solution to this that we used for years was to catch the received-focus event (sorry, can't remember what it is) and then explicitly force th focus to something else. It's kludgey, and not easy (because of the vagaries of event-ordering and reordering in VB/Com Windows), but it got the job done.