I want to add a dynamic number of checkboxes to a page. Calling installer.addWizardPageItem() multiple times with the same widget name returns true, but only one is shown.
Related
I have 3 forms, and one form is depending on other 2 forms(Each form is in each test file), So my question is can i know is there any solution(method) to run those 3 forms individually?
(The purpose is i want to run each forms individually)
This is maker form
This is Category form
This is maker type form
These are the three forms which i have mentioned above.
Maker form, and Category form are depending on Maker type form, (The value i'm adding in maker and Category forms as above images, will have to choose from Maker type form)
So these Each three forms are in each test files.
When i run the test i can not run the maker type form individually, because its' maker and category values are taken by Maker form and Category form added values.
Your tests (e2e tests) should follow the user flow, so if one form requires another to complete the task, then that's how you test them.
BUT you can test forms independently using Component Testing. In this type of test you mount just one component (form) at a time and supply input values (normally coming from the other forms) via props.
Here is some info about it My Vision for Component Tests in Cypress
I need to have a field of my form that allows multiple selections so I went through the Django documentation and found the widget SelectMultiple.
It works but only if I press control while selecting the multiple values otherwise it only keeps the last one clicked which is not ideal...
Are there some parameters that I missed or is there another way to do it?
Thanks.
country_selected = forms.CharField(label='Select a country',
widget=forms.SelectMultiple(choices=COUNTRY_CHOICES))
I have one main form ("users.fmb"), one other form ("cards.fmb") and one custom menu ("menu.mmb"). I want to call canvases of forms according to which menu item selected.
For example: When I choose 1. item of menu, call canvas A of "users" form. When I choose 2. item of menu, call canvas B of "cards" form. Menu("menu.mmb") is related with main ("users") form.
How can I do this?
I tried to use
CALL_FORM, OPEN_FORM, GO_BLOCK, SHOW_VIEW, SET_WINDOW_PROPERTY
methods in different ways but it not worked.
if your menu is only attached to users.fmb, you won't be able to call again users.fmb from cards.fmb (except by exiting cards.fmb).
Also if you call again users.fmb from cards.fmb you will have 3 forms in your calling stack (users.fmb -> cards.fmb -> users.fmb), which is not a good idea.
I guess you would have to create another form acting as the main screen from which you can run either users.fmb or card.fmb (you can use CALL_FORM for this).
Also you can use SHOW_VIEW to display a specific Canvas but you will have to do this in the targeted Form.
You can pass the canvas name as a Form parameter (called e.g. "navigation_canvas") and in the WHEN-NEW-FORM-INSTANCE trigger, if this parameter is not null you can then navigate to the desired canvas using SHOW_VIEW(:parameter.navigation_canvas)
in a page 4 menus one by one like the below.
APPS
1.sample1
2.sample2
PERSONAL
1.info1
2.info2
Valuble
1.item1
2.item2.
More
1.item1
2.item2
like the above APPS,PERSONAL,Valuble,More these are Headings.in that items are binding from Sqlite DB.
intially there are no items .DB is creating .by click on button in that page navigating to another page here i'm binding categories[APPS,PERSONAL---] to combobox and one textbox is there.in that way i'm adding items to mainpage.
functionalty is ok but i taken four listboxes statically placed in that i'm binding the items.but intially no items while db creation.if whenever adding the PERSONAL item first the first listbox was empty and filling the second listbox.if whenever adding MORE items first ,the above listboxes are empty this is bad design i think.
How to design UI for that...
I would have thought this is is an ideal candidate for the LongList selector control of Windows Phone - similar to the contacts page.
Have a look here http://www.windowsphonegeek.com/articles/wp7-longlistselector-in-depth--part1-visual-structure-and-api
I haven't used it myself but would think that you should be able to use it to get the effect you require.
Using autogenerated form from a single database table. The form uses the class WizBtns included in c:\Program Files\Microsoft Visual FoxPro 9\Wizards. The form has Top, Previous, Next and Bottom buttons.
Although the form only has textboxes to enter data for the fields in the table, I have added a custom Text Box from the toolbox which basically intends to display the sum of some fields. I have bound the ControlSource of the text box to a PUBLIC variable costTotal that is created on the form init.
Now the problem is updating the sum of fields in the text box, or simply updating value of costTotal. Where to add the code for this? Adding the code in the form's Refresh method mixes up the value of costTotal, when I press Next button to update all fields with new values, the custom text box displays the sum of the last record which is mysterious.
I would add a method to the form to do the calculation. Then, call that method from the Valid method of each of the textboxes involved in the calculation.
There is nothing wrong with using the refresh event to recalculate the values, just make sure that you call the refresh each time the record changes
If you are using navigation buttons to move between records then the click event of EACH button is an ideal place to issue the refresh request :-
Assuming the textbox is called txtSum and is located on the same form as the navigation buttons then in each buttons click event add this code
dodefualt()
with thisform
.txtSum.refresh()
endwith
Couple of things:
1) do not use the wizards! Make your own base classes. Trying to figure out what the wizard classes do and how to add functionality will take more time that coding your own base classes. Also, the wizard generated code and classes must be at around 10/20 years old, much has changed since then (a polite way to say they suck).
2) Do not EVER use public variables in FoxPro, except for maybe an app object.
If this is a one shot thing, just add default textboxes and buttons and design the form yourself. You will have total control and you will know what each thing does.