الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كيف اعمل تعتيم (disable)للقائمة الرئيسية؟!

مغلق
بدأه lonelyguy_sa في 18 يناير 2003 · 3 رد · 713 مشاهدة · في مراجعة المواضيع
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

الاخوان الكرام السلام عليكم ورحمة الله وبركاته وبعد:

انا عندي قائمة منسدلة عملتها عن طريق ماكرو addmenuitem

وعرفت اخفي جميع العناصر التي داخل القائمة ولكن السوال

كيف اعمل تعتيم (Gray)للقائمة نفسها!

مثال:- File

new

edit

save

-

-

-

كيف اعمل تعتيم لFile

انا قدرت اسوي تعتيم للعناصر الداخلية باستخدام:-

Syntax

DoCmd.SetMenuItem menuindex[, commandindex][, subcommandindex][, flag]

The SetMenuItem method has the following arguments.

Argument Description

menuindex An integer, counting from 0, that's the valid index of a menu on the custom menu bar or global menu bar for the active window, as defined in the menu bar macro for the custom menu bar or global menu bar.

If you select a menu with this argument and leave the commandindex and subcommandindex arguments blank (or set them to –1), you can enable or disable the menu name itself. You can't, however, check or uncheck a menu name (Microsoft Access ignores the acMenuCheck and acMenuUncheck settings for the flag argument for menu names).

commandindex An integer, counting from 0, that's the valid index of a command on the menu selected by the menuindex argument, as defined in the macro group that defines the selected menu for the custom menu bar or global menu bar for the active window.

subcommandindex An integer, counting from 0, that's the valid index of a subcommand in the submenu selected by the commandindex argument, as defined in the macro group that defines the selected submenu for the custom menu bar or global menu bar for the active window.

flag One of the following intrinsic constants:

acMenuCheck

acMenuGray

acMenuUncheck

acMenuUngray (default)

If you leave this argument blank, the default constant

(acMenuUngray) is assumed.

=====

مشكورين

#3

أخي الكريم

السلام عليكم

استخدم الدالة التالية

Function setCmdControol(CmdBarName As String, CmdCaption As String, doWhat As Boolean)



 Dim newItem As CommandBarControl





Set newItem = CommandBars(CmdBarName).Controls(CmdCaption)

    newItem.Enabled = doWhat

End Function

علماً بأنه يتم تمرير اسم شريط القوائم وعنوان القائمة التي تريد تمكينها أو عدم تمكينها ومتغير من نوع False/ True

حيث إن False يعني عدم التمكين و True يعني التمكين

تحياتي

أخوك / أبو هاجر

#4

الاخ محسن محمد جزاك الله خير بس هذا ليس المطلوب انا احتاج اسوي disable ليس لtoolbar ولكن ل menu items

================

الاخ ابو هاجر انا استخدمت macro لعمل القوائم!!!

----------يعطيكم العافية شباب

هذا الموضوع مغلق.

مواضيع مشابهة