Home » Developer & Programmer » Forms » call a block from another form
call a block from another form [message #574879] Wed, 16 January 2013 08:40 Go to next message
goldray
Messages: 108
Registered: December 2012
Senior Member
Hi,
I have a main interface that contains 3 buttons (emp, dept, mgr) I want when I click on the button 'emp' interface opens in the main interface(the buttons must remain in the main interface)
is it possible ?

see the picture :
http://nsa30.casimages.com/img/2013/01/16/130116033744750095.png
Re: call a block from another form [message #574921 is a reply to message #574879] Wed, 16 January 2013 14:01 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I can tell, you can't open another form that way.

However, you could create 3 different blocks (one for each button) and put them on tab canvas (one block per canvas). Or, create 3 different stacked canvases and - again - put one block onto each of them.

Button code would then simply navigate to these blocks (GO_BLOCK).
Re: call a block from another form [message #574974 is a reply to message #574921] Thu, 17 January 2013 05:18 Go to previous messageGo to next message
haku
Messages: 3
Registered: January 2013
Junior Member
go_block(block_name)
it navigates you the canvas which block_name is in it
Re: call a block from another form [message #575113 is a reply to message #574974] Sat, 19 January 2013 11:23 Go to previous messageGo to next message
goldray
Messages: 108
Registered: December 2012
Senior Member
Hi,
I have two canvas(1:content ,2:stacked) ,i used when-button-pressed trigger to show the stacked canvas using "show_view('canv_stacked');"
but the stacked canvas is not displayed !!!!
Re: call a block from another form [message #575115 is a reply to message #575113] Sat, 19 January 2013 11:57 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you correctly set its X and Y properties?
Re: call a block from another form [message #575120 is a reply to message #575115] Sat, 19 January 2013 12:23 Go to previous messageGo to next message
goldray
Messages: 108
Registered: December 2012
Senior Member
I think the problem is of dimension at the canvas stacked ..
i will set again X and Y .
Re: call a block from another form [message #575122 is a reply to message #575120] Sat, 19 January 2013 13:20 Go to previous messageGo to next message
goldray
Messages: 108
Registered: December 2012
Senior Member
the problem is on the "visible" property.
explanation:
I have 2 buttons 1: EMP(visible), 2: Insert(not visible).
1:EMP has when-button-pressed trigger :set_item_property('insert',visible,property_true);
2:Insert has when-boutton-pressed trigger :go_item('id'); show_view('canv_stacked');

=> the stacked canvas is not displayed, but when I change from the palette button "insert" and make it visible, the canvas will be displayed
why !!
Re: call a block from another form [message #575157 is a reply to message #575122] Sun, 20 January 2013 08:12 Go to previous message
goldray
Messages: 108
Registered: December 2012
Senior Member
I solved the problem by adding these two instructions when-button-pressed trigger of EMP:
set_item_property('insert',ENABLED,PROPERTY_TRUE);
set_item_property('insert',NAVIGABLE,PROPERTY_TRUE);
Previous Topic: use like operator with if condition
Next Topic: logo type .png
Goto Forum:
  


Current Time: Fri Mar 29 00:41:09 CDT 2024