الأربعاء، ٢٨ أكتوبر ٢٠٠٩

SCROLL_VIEW

الـ SCROLL_VIEW Built-in تقوم بتحريك الـ View فى الـ Canvas التى بها على حسب الاتجاه المحدد فى معامل الـ X و الـ Y ، و يؤدى ذلك بدوره الى أظهار بعض المناطق من الـ Canvas التى كانت مخفية الى الـ End User ، و لكنه فى نفس الوقت لا يغير من وضع - Position - الـ View بالنسبة للـ Window.

هذا الأجراء يظهر كيفية أستخدام الـ SCROLL_VIEW Built-in




/*
** Built-in: SCROLL_VIEW
** Example: Scroll the view whose name is passed in 10% to
** the right or left depending on the 'direction'
** parameter.
*/
PROCEDURE Scroll_ten_percent
(viewname VARCHAR2,
direction VARCHAR2)
IS
vw_id VIEWPORT;
vw_wid NUMBER;
vw_x NUMBER;
cn_id CANVAS;
cn_wid NUMBER;
ten_percent NUMBER;
new_x NUMBER;
old_y NUMBER;
BEGIN
/*
** Get the id's for the View and its corresponding canvas
*/
vw_id := Find_view(viewname);

cn_id := Find_canvas(viewname);

/*
** Determine the view width and corresponding canvas
** width.
*/
vw_wid := Get_view_property(vw_id,width);

cn_wid := Get_canvas_property(cn_id,width);

/*
** Calculate how many units of canvas width are outside of
** view, and determine 10% of that.
*/
ten_percent := 0.10 * (cn_wid - vw_wid);

/*
** Determine at what horizontal position the view
** currently is on the corresponding canvas
*/
vw_x := Get_view_property(vw_id,viewport_x_pos_on_canvas);

/*
** Calculate the new x position of the view on its canvas
** to effect the 10% scroll in the proper direction.
** Closer than ten percent of the distance to the edge
** towards which we are moving, then position the view
** against that edge.
*/
IF direction = 'LEFT' THEN
IF vw_x > ten_percent THEN
new_x := vw_x - ten_percent;
ELSE
new_x := 0;
END IF;
ELSIF direction = 'RIGHT' THEN
IF vw_x < cn_wid - vw_wid - ten_percent THEN
new_x := vw_x + ten_percent;
ELSE
new_x := cn_wid - vw_wid;
END IF;
END IF;

/*
** Scroll the view that much horizontally
*/
old_y := Get_view_property(vw_id,viewport_y_pos_on_canvas);

Scroll_view(vw_id,new_x,old_y);
END;


و هذا الرابط به التنفيذ العملى fmb file للكود السابق ذكره

أضــــــــــــــــــــــــــــــغـــــــــــــــــــــــــط هـــــــــــــــــــــــــــــــــــــنا

Share/Save/Bookmark

PRINT Built-in

الـ PRINT Built-in تقوم بطبع محتوى النافذة الحالية الى الطباعة أو الى ملف .

PRINT Examples

/*

** Built-in: PRINT
** Example: Print the current window.
*/
BEGIN
Print;
END;

يمكنك تحميل ملف الـ fmb من هذا الرابط :-

أضــــــــــــــــــــــــــــــغـــــــــــــــــــــــــط هـــــــــــــــــــــــنا

و بالتوفيق

Share/Save/Bookmark

الأحد، ٢٥ أكتوبر ٢٠٠٩

تظبيط قيم متغيرات الـ SQLPLUS لمرة واحدة فقط

سنقوم هنا بتظبيط قيم متغيرات الـ SQLPLUS لمرة واحدة فقط بدلاً من تظبيطها فى كل مرة ، و أنا أقصد بهذه المتغيرات كالـ :

SET SERVEROUTPUT ON
SET ECHO ON
SHOW USER

و غيرها كتير ، الفكرة هنا تكمن فى الذهاب الى :-

ORACLE_HOME$\sqlplus\admin

ثم فتح ملف الـ glogin.sql و أضافة اى متغيرات - او حتى اكود - تريد تنفذها فى كل مرة تدخل فيها على الـ SQLPLUS

و أترككم مع الفيديو :-


Share/Save/Bookmark

السبت، ٢٤ أكتوبر ٢٠٠٩

الدخول مباشرتاً الى برنامج الـ SQL*PLUS

الفكرة بكل بساطة هى عمل Right Click على الـ SQL Plus ثم أختار Properties و فى الـ Target أضف أسم الأسكيمة ثم كلمة المرور ثم أسم قاعدة البيانات ...... و هذا شرح منى بالفيديو يوضح كيفية عمل ذلك



و أرجو أن ينول أعجبكم
Share/Save/Bookmark
Newer Posts Older Posts Home Page