rajram_rvr
27th January 2011, 10:16
Hi Gurus

I am using the Dsc fields to create a small colour box to differntiate between different type of records. But when i configure the x, y coordinates, height and width. its coming correctly against each record for one and not for other user , because both users have differnet pixel settings in their desktop. I mean one using XP and other windows 7.

Is there anyway to have a x / y co ordindates and height of dsc fields defined such that its commmon for all.

Your response is highly appreciated

Thx

Rama

NirajKakodkar
27th January 2011, 13:13
I think you can use
get.window.attrs( long wind_id, ref long attrs(WINMAXSIZE) )

get the x/y co-ordinates of the parent window and based on it assign your x/y attibutes for child window.

This should work though I have tried it.

rajram_rvr
28th January 2011, 06:33
Hi

Thanks for the reply. I tried using the get.window.attrs. But during execution, i get a bw message window saying DSN rows and columns not possible.

I used following in the script.


string attrs(WINMAXSIZE)
get.window.attrs(current.mwindow(), attrs)

long x = win.x(attrs)
long y = win.y(attrs)

But when calling function get.wndow.attrs, it gives the message window. can you help me out?

Thx

Rama

theierm
22nd February 2011, 13:43
Hi,
in BaaN IV i use this:

long sd(SRVMAXSIZE)
long height, width

get.display.data(sd)

height = srv.display.height(sd)
width = srv.display.width(sd)

mpfaender
22nd February 2011, 15:10
Hi,
in ERP LN its the same way.

get.display.data(server_data)
srv_width = srv.display.width(server_data)
srv_hight = srv.display.height(server_data)

|* if display resolution smaller then 1920x1200
if srv_width < 1920 then
vh1 = srv_width / 96.00
vh2 = x / 96.00
x = x - (round(vh1,0,2) * round(vh2,0,2))
endif

if srv_hight < 1200 then
vh1 = srv_hight / 96.00
vh2 = y / 96.00
y = y - (vh1 * vh2)
endif

id = create.object(DsCgwindow,mainw,
DsNwidth, w,
DsNheight, h,
DsNx, x,
DsNy, y)

best regards
michael

NPRao
22nd February 2011, 21:17
I am using the Dsc fields to create a small colour box to differntiate between different type of records.
If you have a Webtop installation you can use the 'Conditional Coloring' feature.
Note - the low level graphic code in the above postings work only for BW/Worktop and not Webtop.