Alpha Video Training
Results 1 to 3 of 3

Thread: restricting number of entries for an xdialog text input

  1. #1
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    786

    Default restricting number of entries for an xdialog text input

    Cant seem to get this working!

    I want the following xdialog to allow upto 16 entries in a multi text box, Ive tried several ways but to no avail, so can someone point me in the right direction please?


    Code:
    DIM SHARED search_values as C
    DIM SHARED varC_result as C
    DIM SHARED word_count as n = 0
    heading_string = "Enter Id(s)"
    footer_string = "Maximum of 16 "
    title_string = "Multipe Id Search"
    Delete XdialogStyle
    dim XDialogStyle as p
    XDialogStyle.AccentColor = "#234+234+255"
    XDialogStyle.Color = "#217+236+221"
    varC_result = ui_dlg_box(title_string,<<%dlg%
    {Windowstyle=Gradient Horizontal Top}
    {region}
    {Region}
    {text=30,1:heading_string};
    {Endregion};
    {condition=word_count<17}
    {Region}
    :| [%mw%.12,16search_values];
    {text=2,1:word_count};
    {Endregion}; 
    {condition=.t.}
    {Region}
    {text=30,1:footer_string};
    {Endregion};
    {line=1,0};
    <*10ok!OK> <10cancel!CANCEL>;
    {endregion};
    %dlg%,<<%code%
    word_count = w_count(search_values,crlf())
    ui_modeless_dlg_refresh(title_string)
    %code%)
    if varC_result = "ok" then
        '' search code
    end if
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

  2. #2
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,620

    Default Re: restricting number of entries for an xdialog text input

    Graham

    I think you meant to post this in an Alpha 5 forum.

    Xdialog doesn't exist in Alpha 4.

    But something like this works...
    Code:
    DIM SHARED search_values as C
    DIM SHARED varC_result as C
    DIM SHARED word_count as n = 0
    heading_string = "Enter Id(s)"
    footer_string = "Maximum of 16 "
    title_string = "Multipe Id Search"
    Delete XdialogStyle
    dim XDialogStyle as p
    XDialogStyle.AccentColor = "#234+234+255"
    XDialogStyle.Color = "#217+236+221"
    varC_result = ui_dlg_box(title_string,<<%dlg%
    {Windowstyle=Gradient Horizontal Top}
    {region}
    {Region}
    {text=30,1:heading_string};
    {Endregion};
    {condition=word_count<17}
    {Region}
    :| [%mw%.12,16search_values!New_Word];
    {text=3,1:word_count};
    {Endregion}; 
    {condition=.t.}
    {Region}
    {text=30,1:footer_string};
    {Endregion};
    {line=1,0};
    <*10ok!OK> <10cancel!CANCEL>;
    {endregion};
    %dlg%,<<%code%
    if a_dlg_button = "new_word" then
        a_dlg_button=""
    end if
    trace.WriteLn(a_dlg_button+search_values+" "+word_count,"word")
    word_count = w_count(search_values,crlf())
    ui_modeless_dlg_refresh(title_string)
    %code%)
    if varC_result = "ok" then
        '' search code
    end if
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    786

    Default Re: restricting number of entries for an xdialog text input

    Thanks Al,
    Ill give it a go :)
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

Similar Threads

  1. Creating a Data input form with multiple entries for each record
    By JSherriff in forum Application Server Version 10 - Web/Browser Applications
    Replies: 9
    Last Post: 03-14-2012, 10:52 AM
  2. restricting characters entered in text box
    By jackswift in forum Alpha Five Version 10 - Desktop Applications
    Replies: 9
    Last Post: 04-30-2010, 05:59 PM
  3. Number entries being rounded?
    By Leonw43 in forum Alpha Five Version 10 - Desktop Applications
    Replies: 9
    Last Post: 03-09-2010, 10:02 AM
  4. XDialog - restricting number of crlf and charactors
    By Pete119j in forum Alpha Five Version 8
    Replies: 6
    Last Post: 02-15-2010, 12:15 PM
  5. variable for unkown number of entries
    By Anis in forum Alpha Five Version 6
    Replies: 8
    Last Post: 12-17-2004, 09:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •