How to build UIMap for a complete page, rather than record certain actions? - testing

I am doing some Coded UI test.
I want to generate a UIMap class for the page under test.
Is there any efficient way or tool to do this? I don't want to click all the controls on the page one by one.
Thanks.

This sounds like a good idea, but probably isn't. Any given 'page' or grouping of controls... could really be tens or potentially even hundreds of UI elements. The actual controls that the user could interact with might be very small.
You wouldn't want every label and every border etc mucking up the available options. So while it's a pain to click on each control in order for it to show in the map, it's probably best to keep your tests concise and robust.
Also, if there are a whole bunch of controls the user actually interacts with on one 'page,' I would even suggest creating separate UIMaps for sections of the 'page.'

This is not a good idea at all. You will want your CUITs broken up as much as possible. If you put every control in one UIMap the map can become way too large causing added time to debug the simplest things.
The other reason to break up your CUITs into separate UIMaps is because if something happens to one of the controls in the UIMap (say you accidently deleted it) and you cannot fix it, you will need to start over from scratch! Much easier to redo a couple of controls rather than the entire page.

Related

Access custom right-click menus

I have written an app that makes extensive use of custom right-click menus on an Access form. The code works great and the user loves it, but lately I am having trouble making it work properly.
In earlier versions of Access it worked well, but newer version seem much more limited in how many items can be put in such menus. The documentation is silent on the matter, and nobody in any newsgroup has had any useful ideas, but I regularly get random error about stack space, out of memory, and general lockups when populating the menus. Doing a C&R used to help, but now even that is not enough, and some menus I can no longer populate at all.
I tried building an app that just built menus until it crashed, to get some idea of what the limits may be, and I am well below what that indicated, but the experimental app had nothing else, while the real app has a great deal else.
Is there any information on how much stuff can be put into these menus, and what the menus share space with? There may be something I can do another way to make more room for the menus. I tried moving all code out of the form, leaving only event stubs that called routines in standard code modules, but that did not help.
And how are they stored/activated? The app is MUCH slower to load when it has these menus, even though no code is running on start-up.
********** Edited to add this:
I use VBA to create a menu, like this:
Application.CommandBars.Add "RCStat", msoBarPopup, False, False
then add it to a control. like this:
Application.CommandBars.cboStat.ShortcutMenuBar = "RCStat"
I add controls (only popups and buttons) like this:
Application.CommandBars.Controls.Add(type:=msoControlPopup)
Application.CommandBars.Controls.Add(type:=msoControlButton, Parameter:="StatKod = 77")
It runs perfectly and the menu items work exactly as expected, except that it bombs after adding some number of controls. It doesn't seem to matter where I add them, just the total number of added controls hits some undefined threshold, and the app crashes.
I got the original code from Getz, Litwin and Gilbert, 2000 edition. Back then, it worked great. But as the versions advance and the app accumulates data, it is becoming less and less functional. However, there are only around 10,000 records, and the app itself is less than 100MB - nowhere close to any of Access's upper size limits.
Pete,
I've done quite a bit of work with shortcut menus, and created the Access Shortcut Tool about 5 years ago, but have never attempted a menu with so many controls although some have 3 or 4 levels.
I am not aware of any restrictions on the number of elements in the commandbars collection, but I find that shortcut menus with too many options, like lists and combo boxes with too many items, are difficult for users to navigate. I generally break these up into segments and use buttons in the form header to display the appropriate menu. Sorry I'm unable to provide anything more helpful.
Dale
We have a commercial product, Total Access Components, that includes as one of its 30 components a right click popup menu that can include icons and font styles.
Here's the info for the popup menu control: https://fmsinc.com/MicrosoftAccess/controls/components/popup-menu/
There's a free trial if you want to try it.

PivotItemHeader in two rows?

I'm currently building an app where I use a PivotControl as the standard navigation. I managed to style the headers now but after some thought I realised that I should probably make the whole app sizeable for different screens. Not every screen (especially in IoT scenarios) will be a full HD screen :D
Thats the current control:
My problem now is that when I make the screen and the PivotItem smaller it just cuts off the end of the pivots like you can see at the right of the picture.
What I would rather have is that when the PivotItem gets smaller I want the Headers to stack.
Like in this quickly googled example:
But I don't know how I should make that possible...
Does anybody have an idea?
What are you trying to build?
Could the content be organized in other way?
Pivots or similar controls (tabs, segmented controls etc) work best with few items that are important to the user and deserve the central stage.
The screenshot you added violates several UI best practices and I suggest you find an alternative to structure your UI that is user friendly.

Template 10:Using MasterDetail along with Hamburger Template

I am using template 10 for developing a UWP app and i'm using hamburger template so when a user clicks on a particular category i would like to navigate him to a event list in a master detail view where on left is complete event list in that category and on right selected event details.There is a sample provided and its difficult to understand and don't know how to use the sample in my app along with hamburger navigation.Also as an extra feature if the user clicks on a particular category the hamburger panel should hide and masterdetail view of event should come.And when user click on back button the panel should appear again with that page.
If anyone could help me it would be of great help.Thanks in advance.
There is a really detailed sample in the repository. It has 2 examples in total. 1 a control being developed by a community member. The other is a design based around using basic XAML with visual states along with responsive triggers for screen sizing.
I've implemented the response non-usercontrol variant and it works very well. The other control based scenario has some good features and is being updated often for feature additions and corrections.
Master Detail Sample
I think what you might be looking for here is a slightly simpler thing that we are able to give you. Master/Detail is certainly not splitting the atom. That being said, it's not just a drag and drop thing either. Your are going to need to take a look at the sample. Try to reproduce it exactly into a blank project. It's a great resource, but it's not a control for you to use as much as a sample for you to refer to. I certainly wish I had a simpler answer for you, but this is going to take a little effort on your side to understand the mechanics and implement it. In the end, once you pass that "ah ha" moment, I think you will look back and realize it's simpler than you thought. But until you understand how it works at a fundamental level, it's just going to continue to confuse you. I agree with #mvermef that the visual-state approach (the primary approach) is the easiest and uses the skills you will want to learn for future development, too. But, to that end, please recognize there are TWO approaches in that sample. One uses view-states and the other uses a custom user control. If I were you, don't pick the second approach. The first approach will be easy to understand, easy to implement, and wonderfully helpful to understand for other things later down the road.

How to add scrolling option on component parameter GUI?

I'm using Dymola but I expect OpenModelica might very well be the same (or at least similar).
For a given component model sometimes it makes more sense to have lots of parameters shown on one "tab" of the parameter GUI. This can lead to an excessively long GUI which, for many reasons including for psychological reasons in relation to how humans process information, is not a appropriate solution.
To solve this I would like to add a vertical scroll bar on the parameter GUI. I believe I saw it once though I cannot recall exactly where.
For illustrative purposes look to the right side of your web browser window. That gray bar that goes up and down is the scrollbar :). I know, obvious but you never know.
I assume I need to put some command in an annotation somewhere though where and what command I am not sure. For example, I found some reference to a verticalScrollBarPolicy but alas, I can not find any documentation on this.
Anyone know how to do this?
EDIT #1:
Dymola (and Adrian indicated OpenModelica as well) will automatically create the scroll bar when the GUI gets larger than the screen. Unfortunately (at least in Dymola) there is little margin so if you GUI is a fraction smaller than the window the "OK" button will be covered by the ribbon on the bottom of the screen and the GUI will be needed to made slightly larger to make the scroll bar appear automatically. This is a reason why a manual option for a scrollbar would come in handy.
I think additional "tabs" might help?
As far as I know in OpenModelica we have a scroll bar for that dialog windows if the window would expand out of the screen.
As of this posting my understanding based on feedback on this forum, my own experience, and from additional discussions with others there is no current manual control of the GUI (i.e., size, scrollbars, etc.).
Your best bet if you come across issues (e.g., you have a super small 2nd monitor) is to use lots of tabs and keep descriptions very short (which is probably appropriate for most applications anyways).
This is a Dymola and OpenModelica issue not a modelica issue as it is not contained in the modelica specification (as I understand it).
If this changes and I find out about it I'll remove or update this post.

Is there a way to 'lock' the last item in a ListView to always show?

I am listing folders and folder sizes in a ListView for a VB.NET WinForm program I'm writing. I would like to total the folder sizes in the last entry of the ListView and 'lock' it show it always shows (even if scrolling through the list.
Is there a way to do this? I'd really like to avoid adding another control on the Windows Form to display the total.
EDIT:
Space is somewhat of an issue as I'm trying to keep this window small enough to work in a min screen resolution of 800x600 (I know, waaaaay not the standard, but I want to make this available to even those in the elderly community with problematic eyesight.
Thanks!
-JFV
There appears to be ways to do this in Webforms and WPF, but not in Winforms. You should probably use a text box. Any attempt to hack in a fixed totals row would most certainly be far more effort than the benefit obtained. It is certainly beyond my capabilities. Even the custom control shops like Telerik don't seem to do this.
http://www.telerik.com/products/winforms/gridview.aspx
If you're concerned about space, make the gridview a little smaller to accomodate the text box.