Home » Developer & Programmer » Forms » ..WIndow problem
..WIndow problem [message #136123] Tue, 06 September 2005 05:16 Go to next message
orcl_dba
Messages: 84
Registered: March 2005
Member
hi Gurus, specially senior members.
sorry for putting up such small questions..

The requirement is that i have a datablock on a canvas1

It contains information about Employee having total of 15 fields.
i posted this question last time as well and did not recieve proper answer.
I want to display only 10 fields on canvas1
and rest on another content canvas which can be displayed on users request.
Now i created another canvas having same datablock in a seperate window.

when i code behind button like

set_window_property(winname,Size,x,y);
and set_window_property(winname,position,x,y)

show_view(canvas2)
go_item(item on canvas2)

this works perfectly as user when press button the new canvas in a new window is shown at a required position

Now when i write a trigger behind forms trigger
when_new_form_instance

set_window_propoerty(forms+mdi_window,windowstate,maximised)
and set_window_propoerty('window1'windowstate,maximised)

Now what happens is that

first the Window1appears in a maximised state.

now when i press that button, the second canvas on window2 is displayed but do not in a specified size at a specified position
rather it opens in a maximised state hiding the previous window which contans those 10 fields of emp


what to do .. plz give some good suggestion , not like that i revied yesterday where ppl say that you cannot have 2 content canvases

br
Re: ..WIndow problem [message #136175 is a reply to message #136123] Tue, 06 September 2005 08:56 Go to previous messageGo to next message
magnetic
Messages: 324
Registered: January 2003
Senior Member
very strange behaviour... there must be something you typed in wrong.. it seems like the the size of the window2 is not set( the code mistyped? or uses window1 instead of 2?)
you are using the same attributes in 2 blocks
if you copy/pasted... check the canvas of the attributes on block 2, hopefully theyre not referring to block 1

try then:
show_view('canvas2');
go_block('block2');
go_item('block2.item1');
synchronize;
Re: ..WIndow problem [message #136185 is a reply to message #136123] Tue, 06 September 2005 10:11 Go to previous messageGo to next message
orcl_dba
Messages: 84
Registered: March 2005
Member
show_window('w2');
set_window_property('w2',position,30,90);
set_window_property('w2',window_size,200,150);
go_item('t1');


Dear magnetic . this is the code i wrote.. behind the button

It does show the 2nd window /2nd canvas. and 2nd block.. but in a maximised state
why is it not going to set the properties of windows.

had i not write the statement go_item('t1')
it started resizing window2 but it hide the window behind window 1 which is maximised and does not show us.

we need to resize window1 to see window 2 behind that ..

whats going on here '

Can u suggest some other solution..
I just need is that

I have a table A having 20 fields.
10 of the fields i want to show on a cnavas1
and rest 10 i want to place on another canvas on same or new window.
I just need is that when user wants to see other 10 it will display but in a smaller window size so that user can both view first 10 and next 10..

simple things..

thanx alot for the answers.

BR
Re: ..WIndow problem [message #136238 is a reply to message #136185] Tue, 06 September 2005 20:05 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Don't use 'go_item('t1');' use 'go_item('blk.t1');'.

On which canvas does 't1' reside? IF it is 'canvas1' then 'canvas2' may be hidden when 'canvas1' becomes the focus.

Update: Read the threads from the last few days ... someone else had this 'problem'. I couldn't find the reference, sorry. Have you considered using either an overflow window with the 10 extra fields for ONE record. You put a button on each row (one button on main block) and when it is pressed it pops up a new window which shows the extra 10 fields for THAT record. Alternatively, use a sliding canvas so that the extra ten fields for ALL the records of the block can be seen. You put the 'main fields' on the static part of the canvas and slide the other fields. This takes a bit of playing around to get the offsets and lengths of the canvases correct but is quite common in many applications.

David

[Updated on: Tue, 06 September 2005 20:19]

Report message to a moderator

Previous Topic: how to run forms?
Next Topic: configuration
Goto Forum:
  


Current Time: Fri Sep 20 05:45:00 CDT 2024