Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert checkbox in shortcut or menu

Status
Not open for further replies.

ameedoo3000

IS-IT--Management
Sep 20, 2016
233
EG
hi all
how can i insert checkbox in shortcut or menu
i have shortcut in the frist image . i want to inset checkbox in this menu as the second image. how can do that
one_qx920b.png

tow_jsjjz9.png
 
the open and close form2 is the easiest way for me.yes i will do that.thank you very much dear MikeLewis.
 
Going with Mikes steps, you create the second form in the first forms Init. At that ime the first form is not yet visible and that will be the reason the second form is behind, its creation starts later, but finishes fully before the first form init, show and activate of the first form happens after second form init finished. By the way LISA is mnemonic for Load,Init,Show,Activate and tells you that this is the order of events, so what happens is first.L, first.I, but not yet finished, then called from first.I second.LI, fully, and that already is the time when Windows knows second.hwnd and its zorder, while first is not yet fully inited. second.SA (show and activate) do not happen before first.SA, but the finish of the init is the time the zorder of a form is determined by Windows, not the Show.

If you still want to try, the [tt]DO FORM MenuForm NAME THISFORM.oMenu NOSHOW[/tt] should rather be done the first time you'd like to do [tt]THISFORM.oMenu.Visible = .T.[/tt], as that will cause it to appear in front. You then will need to but check by VARTYPE() or ISNULL(), whether THISFORM.oMenu is an object or still .NULL.

But as I already said and you closed it, creating the form as usual is good enough anyway, Mikes approach is advanced, but the recipe obviously doesn't work this way. I use such a report, where I have a form filtering from about 10000 items, which are loaded into a datasession cursor. That then only nees to be done once per application start and in that case it matters, but not in your case.

Bye, Olaf.
 
Thank you very much .. Valuable information and very useful .. I benefited from it .. But as I said that this solution is useful in the case of cases such as I mentioned to you but in my case does not require all this is the order to close the sub-form and reopen it again is easy and pleased.
 
I feel like you aren't really interested in an alternative approach, but regardless...
If you put the ComboBox into the Grid correctly you would get a result something like the following:
Grid_w_Combo1_xwlvju.jpg


Grid_w_Combo2_mdkgex.jpg


Grid_w_Combo3_w4uwha.jpg


As you can see, selecting one ComboBox value for one record does not impact the value for another record and the choices you list at the beginning are all available to the user.

Regardless - Good Luck
JRB-Bldr
 
thanks for participating . The idea is new and beautiful but it does not agree with what I am currently planning but it is good in my second thoughts. The combo box inside the table will repeat every record and I do not want it at all in the current project.This beautiful idea may need something else later. Thank You very very Much Dear jrbbldr.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top