Pop-Up Window

sabzamsabzam Member Posts: 1,149
Hi Everybody,

I'd like to create a pop-up window, similar to the one release when using the Confirm but this time the user instead of pressin Ok or Cancel enters a figure. Is this possible?

Comments

  • XypherXypher Member Posts: 297
    Only other method of receiving e/u input would be to use a dialog.

    Here is some code that I dug up from a form I made: (Sorry I'm running late and don't have time to whip something up more descriptive.)
    //Text003 = Enter Upperbound Date: #1######\ \(Hit 'Enter' to apply custom date.)
    IF gCustomDate = 0D THEN
      gCustomDate := TODAY
    ELSE
      gCustomDate := gDateValue[ARRAYLEN(gDateValue)];
    
    lInputDialog.OPEN(Text003);
    
    REPEAT
      lInputDialog.INPUT(1,gCustomDate);
      IF gCustomDate > TODAY THEN
        BEEP(1000,200);
    UNTIL gCustomDate <= TODAY;
    
    UpdateDate(gCustomDate);
    
  • ReinhardReinhard Member Posts: 249
    Create a form, let's call it Form001. Create a textfield, source is an integer tmpInt. Also have a function getTmpInt() that returns this value.

    In your code have this form as a variable.
    //code, code, code. then...
    form001.RUNMODAL;
    desiredValue := form001.getTmpInt;
    
  • kinekine Member Posts: 12,562
    I never used the dialog for entering data. The dialog has some "features" I do not like... 8)

    Better is to use Report for that - just use the request form to collect the data, use function to return them to calling object and you are done... and you do not need to use Form ID and you can edit the report just with the report designer...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.