بتاريخ: 5 ديسمبر 201312 سنة comment_243787 السلام عليكم انا عايز اعمل toolbar ف عملت بلوك فى شويه زراير(query,edit,add,delete,next,previous,exit,save,cancel)بس التول بار دة هايكون فى كل الفورمز اللى هاعملها ف قولت اعمل PROCEDURE اكتب فيه الاكواد و ابقه اعمله attach على الفورمه و استدعيه فى تريجر على مستوى البلوك اللى فيه الزراير و كتبت في الـ PROCEDURE كدة PROCEDURE TOOLBAR_BUTTON IS action varchar2(50); if action = 'query' then EXECUTE_QUERY; elsif action = 'edit' then EDIT_FIELD; elsif action = 'add' then create_record; elsif action = 'delete' then delete_record; elsif action = 'next' then next_record; elsif action = 'previous' then previous_record; elsif action = 'exit' then exit_form; elsif action = 'save' then commit_form; clear_form; elsif action = 'cancel' then clear_form; end if; END; و لما جيت فى تريجر WHEN-BUTTON-PRESSED على مستوى البلوك كتبت toolbar_button; و الكومبايل مفيهوش اى اخطاء بس الزراير مشتغلتش على الفورمه ف لو حد يقدر يساعدنى فى الكود يبقه جزاة الله خيرا(انا شغال forms 11g R2) تقديم بلاغ
بتاريخ: 5 ديسمبر 201312 سنة comment_243788 يا اخي الفاضل ما في داعي لكل هذا الكلام خلي شغلك منظم اولا قم بأنشاء بلوك manually وقم بوضع الازاز التي تريد مع وضع داخلها الكود طبعا لا تنسى ان تكون نوع الــ Canvas نوع horizontal tollbar ونقوم بنقل البلوك والكانفس والوندو لأي فورم اريد او اضعها داخل OBJECT GROUP وانقلها الى فورم اريد تقديم بلاغ
بتاريخ: 5 ديسمبر 201312 سنة كاتب الموضوع comment_243790 مشكور اخى الكريم دة حل جميل طبعا بس انا كنت حابب اتعلم موضوع ال PROCEDURE لان انا لسه فى البدايات و بتعلم يعنىو كنت لقيت حاجه زى اللى انا عايز اعملها بس مفهمتش الكود .. و دة الكود اللى لقيته -- This is a generic button procedure. It reads the NAME of the button and -- performs a DO_KEY(item_name). -- Regarding QUERY-operation: -- if there are buttons called EXECUTE_QUERY and CANCEL_QUERY, this function shows -- them, when the ENTER_QUERY button is pressed and hides them, when EXECUTE_- or -- CANCEL_QUERY ispressed. No error should be returned, if these buttons do not exist. -- To make naming of the buttons easier, EXIT, QUIT and EXIT_FORM all perform exit_form, -- even if the form is in ENTER-QUERY mode !!!!!!! -- A CANCEL_QUERY button-name cancels a currently "open" query. PROCEDURE button_proc IS action varchar(80); -- hide a button (for ENTER_-, EXECUTE_- or CANCEL_QUERY) PROCEDURE show_off(item_name VARCHAR2) IS BEGIN IF NOT Id_Null(Find_Item(item_name)) THEN Set_Item_Property(item_name, DISPLAYED,PROPERTY_FALSE); END IF; END; -- try to show a button (for the two query-states. If there is no button to show, -- return FALSE to the calling procedure. FUNCTION show_on(item_name VARCHAR2) RETURN BOOLEAN IS BEGIN IF NOT Id_Null(Find_Item(item_name)) THEN Set_Item_Property(item_name,DISPLAYED,PROPERTY_TRUE); Set_Item_Property(item_name,ENABLED,PROPERTY_TRUE); RETURN TRUE; ELSE RETURN FALSE; END IF; END; BEGIN action := Get_Item_Property(NAME_IN('SYSTEM.TRIGGER_ITEM'),ITEM_NAME); IF action = 'ENTER_QUERY' THEN -- only hide the ENTER_QUERY button, if there are EXECUTE_QUERY and (!!) CANCEL_QUERY -- buttons. Otherwise an existing EXECUTE_QUERY button will be shown. IF show_on('EXECUTE_QUERY') AND show_on('CANCEL_QUERY') THEN show_off('ENTER_QUERY'); END IF; END IF; IF action IN ('EXIT_FORM', 'EXIT','QUIT') THEN :GLOBAL.REDA_UNIT:=''; :GLOBAL.REDA_FILE:=''; --action := 'EXIT_FORM'; EXIT_FORM; IF NAME_IN('SYSTEM.MODE')='ENTER-QUERY' THEN -- Do_Key('EXIT_FORM'); EXIT_FORM; END IF; END IF; IF action = 'CANCEL_QUERY' THEN -- action := 'EXIT_FORM'; EXIT_FORM; END IF; Do_Key(action); IF NAME_IN('SYSTEM.MODE') != 'ENTER-QUERY' THEN IF show_on('ENTER_QUERY') THEN show_off('EXECUTE_QUERY'); show_off('CANCEL_QUERY'); END IF; END IF; END; بس للاسف انا مفهمتش حاجه تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.