I am using FormBuilder 10.1.2.3.0.
From a WHEN-BUTTON-PRESSED trigger I call a canvas/data block, but it does not display.
The Window Style is Dialog and Modal is Yes.
The Canvas Type is Content, is based on that window, Visible is Yes.
The Data Block is not a database block, and the Items are Enabled and Keyboard Navigable is Yes.
I call my block with this code:
In a certain situation I want the user to input a number. My data block has a Text Item (number) and an OK and a Cancel Button.
I do something very similar in the same form (display an Item and show an OK button) and that works fine.
As per my understanding of your issue, there are 2 ways.. one is what u are trying...in this way first ensure your item have proper canvas setup. Or try to display the canvas without using button. If this work, then there should not be problem.
Second way of doing is ..
Using TAB Canvas. You put all your 'MYBLOCK' data on TAB PAGE(2ND PAGE), ....AND in when buttong pressed, u just use go_block...will complete your job without much effect.
If any issue, post here..
Is there maybe a required item in your block which is still null? In this case the navigation will not work. A possible solution would be to create a simple standalone form with the textitem and Ok and Cancel, then use CALL_FORM to call that form and globals to pass the value. This case, there is no navigation.
What objects are in "MY_BLOCK"? You mentioned in the original post that you had a text item and two buttons in it. Is that all that is in it or are their additional items in that block as well? Are all of the items that are displayed on a canvas in that block assigned to "MY_CANVAS" or are there additional items that might be assigned to a different canvas?
There are only 3 items, a Text Item (Number data type), and 2 Push Buttons, all enabled, navigable, and set to my canvas that is on the modal dialog window. If I display a message after calling GO_ITEM I can see the canvas and all 3 items. But Forms is not stopping to process my block (allow me to edit my number and click OK). I have given my Text Item an initial value. Without the message the canvas does not display.
That's it. If the canvas would display the user would give me a number which I would use in later processing of the WHEN-BUTTON-PRESSED trigger. Pressing OK or Cancel would go to another block, and close my modal window, but Forms is not stopping long enough to process my canvas. Currently it correctly does the rest of the work defined in the WHEN-BUTTON-PRESSED trigger, but with the incorrect number, since the user never gets a chance to enter it and click OK.
Make sure you've specified "Window" property for canvas, and "Primary canvas" property for the window.
Try window style "Document" and canvas type "Content". Set window property "Hide on exit" to No - maybe somehow your window loses focus.
And watch the status bar - maybe there are some error message there? Also try menu help > display error.