I want to make a list with checkbox on the left in the Word document. I don't want to use VBA macro every time.
example:
[] item1
[] item2
*[] is checkbox
Click the Developer tab and in the Controls group, click the Check Box Content Control, and then click to the right of the box.
-
This is the original link. There is too much redundant info.
office Support
Related
Am currently learning Selenium on my own . i am trying to automate the below demo website https://itera-qa.azurewebsites.net/home/automation.
There is a section of radio button to select gender. i was trying to find the number of elements under that particular section . Page has another section of radio button too
If u notice the label gender it is not directly associated to the parent above ]1
Please help me to find the xpath so that i can find the number of radio buttons in the particular section rather than that of the whole page . i spent lot of time in tweaking this
Well, to select the Female radio button you should click on the label element above it. The Xpath for that label element is
//label[.//input[#id='female']]
or
//input[#id='female']/..
(Both are correct).
Similarly, to select Male radio button you can use
//label[.//input[#id='male']]
or
//input[#id='male']/..
Try below xpath to count the radio button under Gender section.
//div[contains(#class,'body-content')]/div[3]//input[#type='radio']
Below code is in python, but you should be able to understand what I am doing
driver.implicitly_wait(10)
driver.get("https://itera-qa.azurewebsites.net/home/automation")
time.sleep(5)
radio = driver.find_elements_by_xpath("//div[contains(#class,'body-content')]/div[3]//input[#type='radio']")
print(len(radio))
Output:
3
Split the xpath to understand.
//div[contains(#class,'body-content')]- points the entire page,
//div[contains(#class,'body-content')]/div - gives all 6 parts of the form.
//div[contains(#class,'body-content')]/div[3]` points to the 3rd `div` where the required radio buttons exists and
//div[contains(#class,'body-content')]/div[3]//input[#type='radio']` points to `input` tags with `type` `radio` only. Replace `radio` with `checkbox` to point only on the checkboxes
Suppose you want radio buttons of `Years of experience in test automation` below is the xpath. Its the 5th `div` tag in the entire page.
//div[contains(#class,'body-content')]/div[5]//input[#type='radio']
Long time reader first time poster here. I have basic knowledge of access coding but nothing fancy. Anyways here it goes. I have coded on click from a Tubular List in access of our products table to be able to open up a certain specific file. When I click on a product name or SKU it does just that and opens that specific record for me called (Product Profile Form). AWESOME! I have on that Product Profile Form Next and Previous Buttons to go to the next or previous records. But if I go through the Product List and click on the Product Title. It Opens and If I then click Next or Previous record Button it first shows a blank Product Profile but on the next click it says "You cant go to that specific record" in a pop up. The Code Macro I have on the Tubular Product List Form is
/ Form Name: Parent Product Profile Form /
View: Form /
Filter Name: /
Where Condition=: ="[Product Parent SKU]='" & [Product Parent SKU] & "'" /
Data Mode: Edit /
Window Mode: Normal /
Parent Product SKU is The Primary Key Field Name in my ParentProductTable
I have tried and tried to figure this out for hours online and here.
Thank you all for any help.
Ok I solved it myself and if anyone else has this same issue the resolution is this. Make a command button on your form. You will have to run a few different macros for the on click event for the command Button. For the Next Record Button After clicking where you want your command button to go on your form the Command button wizard will pop up. Choose Record Navigation in the categories box and then choose Go To Next Record in the Actions Box. Finish the Command Button Wizard. Then Right click the button and choose Build an event. This will open the Macro Tools. Click add new action and choose the Macro RemoveFilterSort.After that if you hover over the macro RemoveFilterSort you will see green arrows to place your macros in the order you want. Click the green arrows up until it is first at the top. Click Save and then exit. Now you should be able to go to the next record. Do the same for the previous record except in the command wizard pop up choose Record Navigation in the Categories area and then choose Go To Previous Record instead of like before we chose Go To Next Record. I am using Access 2016. What you basically did is told the button to remove the filters before moving on to the next or previous record. If you dont want to make command buttons and use the access supplied navigation buttons at the bottom. You can make a command button with the macro RemoveFilterSort only and you will have to click this button to remove the filter then you can click the Access supplied navigation button. I hope this helps someone.
I have a ComboBox implemented with an auto-completion system. My ComboBox contains more than 100 items. When users are typing text in, the auto-completion system opens the dropdown list and highlights the most relevant item. Moreover, when the dropdown list is expanded, all items are available (no filters). But the most relevant item is always at the bottom of the dropdown list.
I would like it to be in the middle, if possible. One item can have the same reference but another type than another one, that's why I need to see most of them in my dropdown by placing them in the middle.
Any idea ? It's not really important but kind of useful for them. Thanks !
Update :
Here's my ComboBox with the open dropdown. Sorry about that, I had to blur its elements. As you can see, the user starts writting the reference in the ComboBox. The autocompletion works fine, but the corresponding item is found at the end of the dropdown list (in the red frame), almost out of bounds.
I wish it would be highlighted in the middle of my dropdown list instead of so far below.
Your item search may work well, but your list isn't visually filtered, which means it's size always remains the same.
It's scrolled into view, by the wpf system, but still displaying all other items around the relevant one. The reason why it's at the bottom is because wpf Scrollviewer just finished scrolling the item into view and sees no need to scroll it further into the middle.
You could use the CollectionViewSource class. Why ?
It's simple to use, will keep your viewmodel data as it is, and you would have your relevant completion item at the top. It can be obtained by GetDefaultView(..)
Let's say you have a viewmodel flag "IsHidden", stating that it's content does not match the user input:
ICollectionView cv= CollectionViewSource.GetDefaultView(myComboBox.ItemsSource);
// switch filter on
cv.Filter = obj => (obj as myViewModel).IsHidden == false;
// switch off
cv.Filter = null
I am looking into adding a button to the "end" of the grid view.
The idea is that I have a grouped view showing groups and items with in these groups. I only show some of the items within the group and wants to show a "load more" button at the end of the items shown.
I have tried all kinds of things in the standard grouped items page with no luck.
Any good ideas?
Thanks in advance
Kim
The simplest answer is to follow the approach used by most existing apps: Allow the user to click on the header to display all the items.
You can also add the "Load More" button as if it was a normal grid item. Then, style it differently using a different template and ItemTemplateSelector.
Finally, the most complex (and flexible) solution would be to put the "Load More" button above the GridView, and manually sync its location when the GridView is scrolled...
I'm wondering if I can make fake sections in the popup menu:
The rule would be, if the 5th character of the displayed item is different from the 5th char of the previous item in the menu, it has to be highlighted
What do you think?
Thanks!
To achieve this would be a hack.
Normally the items that appear in the popup part of a combo box will be an instantiated data template, and each gets its own data item and has no clue or knowledge of the other items in the list, so you couldn't use a converter or anything else to achieve this behavior.
What you could do though is inject (attach) your own control into the popup part of the combo box, and take over the rendering of the data items. How you do this will depend upon which combo box you are using (i.e. MS or some other vendor's) and would be a whole new question.
Would that be easier if I were to create my own combobox as follow:
a TextBox associated with a Button that when pushed would popup a datagrid in which I could implement this conditional formatting?