Oracle, Web, Script, SQLserver, Tips & Trick

December 5, 2012

How to automate change x,y position item on database block (oracle developer 6i)

Filed under: dev6i,oracle — sikathabis @ 11:47 am
Tags: ,
For example I want to set x,y position for all fields inside certain canvas

 PROCEDURE SET_POSISI(cvs_name varchar2, block_name varchar2, incx number, incy number) IS
 vName VARCHAR2(50) := block_name;
 vFirstItem VARCHAR2(200);
 vLastItem VARCHAR2(200);
 vCurrItem VARCHAR2(200);
 BEGIN
 GO_BLOCK(vName);
 vFirstItem := vName||'.'||Get_Block_Property(vName,FIRST_ITEM);
 vCurrItem := vFirstItem; 
 vLastItem := vName||'.'||Get_Block_Property(vName,LAST_ITEM);
 <<BLOCK_LIST>>
 WHILE ( vCurrItem != vLastItem ) LOOP
 if GET_ITEM_PROPERTY(vCurrItem,CANVAS_NAME)=cvs_name then
 SET_ITEM_PROPERTY(vcurritem,POSITION, GET_ITEM_PROPERTY(vcurritem,X_POS)+incx, GET_ITEM_PROPERTY(vcurritem,Y_POS)+incy);
 end if;
 vCurrItem := vName||'.'|| Get_Item_Property(vCurrItem,NEXTITEM);
 GO_ITEM(vCurrItem);
 END LOOP BLOCK_LIST;
 END;

If the item including Radio button, you can add this example on BLOCK_LIST looping
 IF vCurrItem =vFirstItem and block_name='CIS_ALAMAT' then
 SET_RADIO_BUTTON_PROPERTY('CIS_ALAMAT.KD_KOTA2','DALAM_IBUKOTA',POSITION,
 GET_RADIO_BUTTON_PROPERTY('CIS_ALAMAT.KD_KOTA2','DALAM_IBUKOTA',X_POS)+incx,
 GET_RADIO_BUTTON_PROPERTY('CIS_ALAMAT.KD_KOTA2','DALAM_IBUKOTA',Y_POS)+incy);
 SET_RADIO_BUTTON_PROPERTY('CIS_ALAMAT.KD_KOTA2','LUAR_IBUKOTA',POSITION,
 GET_RADIO_BUTTON_PROPERTY('CIS_ALAMAT.KD_KOTA2','LUAR_IBUKOTA',X_POS)+incx,
 GET_RADIO_BUTTON_PROPERTY('CIS_ALAMAT.KD_KOTA2','LUAR_IBUKOTA',Y_POS)+incy);
 end if;

references : https://sites.google.com/site/craigsoraclestuff/orac
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

Pureblood

DONT WANNA BE NUMBER ONE

Learning is not a spectator sport

Connor McDonald's Oracle blog

Teknologi Pendidikan

Just another WordPress.com weblog

KATAKAMI

Jurnalisme Yang Dapat Dipercaya

Qey050489's Blog

Ayo Bangkit sobat..!!!!!

B. S. Totoraharjo

Orang Desa Yang Mencintai Desa dan Kebudayaannya

culturekitchen foodlab

New Food and Art in Yogyakarta

Wahyu Catur Wibowo

Musafir Dunia Maya

SQL.... Still Learning

My Reference on SQL Server

arihdyacaesar

"Tuhan tidak menuntut kita untuk menang. Tuhan hanya meminta kita untuk berjuang tanpa henti.” -ean-

neinframe

Street Photography is like a box of a chocolates, you're never know what you're gonna get - Thomas Leuthard -

Be a good Moeslim

Menuju Pribadi Muslim Sejati yang Bertaqwa

TuanSUFI

Manajemen Sholat, renungan spiritual, Teknologi Informasi

Pelangi di khatulistiwa....

Mari berbagi kebaikan, pengalaman dan senyum denganku

Angkasa13

Ceritanya saya, Pikirannya saya, Hatinya saya

sikathabis

sikathabis semua informasi disini

Don Charisma

because anything is possible with Charisma

fluoresensi

Keinginan itu pasti terwujud, entah 1 tahun, 2 tahun hingga puluhan tahun kemudian. Bersabarlah #cumanmasalahwaktu

%d bloggers like this: