Author Topic: AskOption "editable" option  (Read 16878 times)

zorglups

  • Junior Member
  • **
  • Posts: 31
    • View Profile
AskOption "editable" option
« on: July 06, 2016, 16:02:20 »
(re)Hello Matthias,

I need a AskText with a dropdown list.
Or a AskOption where I can freely enter text.

That is a ComboBox  ::)

Could you add one argument to the AskText function so that we can give an array of values to be shown in the dropdown list ?
eg:
<num> AskText( <str> label, <str> inputText, <num> option, <arr> values, <num> selected );
values : An array of strings or numbers that will be shown in the dropdown list.

Note: With the AskText, how can I know if the user pressed cancel or entered "0" ?  :-\

Thank you!!!

Pierre

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4489
    • View Profile
    • Multi Commander
Re: AskOption "editable" option
« Reply #1 on: July 06, 2016, 22:28:39 »
it return 0 as a number if canceled
so if variable is a Num type.  it was canceled

Code: [Select]
@var $d = AskText("ddd" , "sss", 0 );
if( IsTypeNum($d) == 0 ) // $d is NOT num . 0 = false
{
...
}