How do I change format on ActiveX Control Option Button when selected? - excel

When I select the ActiveX Control Option Button the entire border (box) becomes highlighted. Is there a way to fix this, perhaps change something in Properties, so when I select the button nothing is highlighted?

It is not clear what you mean by "select the button".
If you mean to click on it, have you tried setting the "TakeFocusOnClick" property to False?
Once you've set the property, click the DesignMode button to get out of Design Mode.

The original question is about a "control option button" which is presumably the Option Button. While the 'Command Button' has a TakeFocusOnClick attribute, the Option Button surprisingly does not. Neither does the Check Box.
This property does not appear on the Properties list on the worksheet in Design Mode or on the auto-complete list in the VBA editor, even though they will both take focus on click.
NOTE: ActiveX buttons are far more flexible than the stock "form controls" that appear at the top of the 'Insert' dropdown panel.

Related

is there a vba code to assign screen clipping to a command butten?

I tried commandbars codes and excutemso but they didnt work and i realized that commandbars are surpersed in newest version of office
How can i use it?
Tnx for your time
CommandBars.ExecuteMso ("ScreenClipping")
In general, to identify a control on the Ribbon:
Hover over the desired button until the name pops up and remember it > rightclick on the ribbon and click "Customise the Ribbon" > in the first column click "All Commands" (NOT All Tabs) > find the remembered name in the alphabetical list and hover over it until info pops up. The actual "Code" name for the button will be the one in brackets.
(I do not know why, but the Button ID Execute method doesn't seem to work on this command)

Excel VBA hide the form control buttons

I have created an "Expandable/Collapsible" structure using VBA. I have added some form controls, like a dropdown or option buttons in each of the section, but the issue is that, when the whole thing is collapsed, the form controls are visible in the button. please check the screenshot and advise a solution.
Yes that is because you have not selected Move and Size with cells.
That option is greyed out when you right click on the control and then click on Format Controls | Properties | Move and Size with cells for Option Button and Combo Box as shown below.
You need to use a different way to activate it.
Click the control and then click as shown below
And then from there you can set those properties.
Now those controls will hide when you collapse the rows.

dojo automatic textbox select

Dojo newbie here and I have a dialog and before I dialog.show(), I want to fully set and select one of the text boxes. The select() is not available as I have tried. As an extension I need to select the entire textbox contents on any click in any textbox after the dialog is up. I cannot seem to get around the missing select(). How do I do it?
There's a selectOnClick attribute on TextBox that should help you out there:
<input data-dojo-type="dijit/form/TextBox"
data-dojo-props="selectOnClick:true"
value="Everything is selected on click"/>
http://jsfiddle.net/inanutshellus/v97wgxLb/
If you want to programmatically set focus and set the selection, you could cheat and call the private _onFocus method directly. Looks like you'd pass in the string "mouse", e.g.
myTextBox._onFocus("mouse");

How remove focus to the list box?

I am having a lisbox where I had set it's property "Selection" to "None".This lisbox is being used in a propertysheet.When I navigate on to the page where list box control is present,here initially when I click on the listbox no selection is happening,this is excepted result.But my only concern is in the lisbox page itself when I use "tab" usually the rectangular dotted line is coming on the Back,Next and Cancel buttons(this is expected),but at the same time after playing with tab around on those buttons,if I had a mouse click on the list box I am getting a rectangular selection on the Item's in the listbox(this is not expected),No selection has to occur.
I even set the "Tab shot" property of the list box to FALSE.
Can anyone please let me know how can I avoid that rectangular selection on the listbox items,even after using "tab" and having a mouse click on the lisbox that rectangular selection should not happen.
Must be a glitch... If you want to prohibit selections on your listbox without disabling it, what happens if you try
void CMyPropertyPage::OnSelchangeList()
{
m_list.SetCurSel(-1)
}

MFC Ribbon CEdit Textbox Allignment in Panel

I am trying to align two text boxes with two buttons in a panel, and I am unable to find anything about how to force positioning inside the MFC Ribbon Panels.
Here is a picture of what I have currently.
http://i.imgur.com/ofD0b.jpg (Sorry wont let me post images yet, have to link.)
The Change View Date box has the box associated with it sitting below it and the change system date box is up in the top right in the second "column" of controls. I would like to fix this so the Box with the spin controls sits next to the CHange View Date and the box without the controls sits next to Change System Date.
Thoughts? Thanks!
I think yow cannot do it.
What you can do is to put a Ribbon Separator after the Box with the spin controls and then set the property 'Center Column Vertically' on the Panel.
Hope it can help.

Resources