<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic DLGSETSUB won't work with drop-down box in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLGSETSUB-won-t-work-with-drop-down-box/m-p/806228#M40348</link>
    <description>&lt;P&gt;Is this a bug, artifact, or is there some way to get it to work. When the box is a straight edit box, it works as it ahould. The documentation states "You can also associate more than one callback routine with the same control, but you must use then use index parameter to indicate which callback routine to use.", but this doesn't work when I set index to 2. Is there an index value that would do it?&lt;BR /&gt;&lt;BR /&gt;Throughout my project, a ? is used to generate a pick list for various edit controls, but with the four places I need to use a drop down list, I can't get it to work.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Oct 2011 10:22:56 GMT</pubDate>
    <dc:creator>nvaneck</dc:creator>
    <dc:date>2011-10-25T10:22:56Z</dc:date>
    <item>
      <title>DLGSETSUB won't work with drop-down box</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLGSETSUB-won-t-work-with-drop-down-box/m-p/806228#M40348</link>
      <description>&lt;P&gt;Is this a bug, artifact, or is there some way to get it to work. When the box is a straight edit box, it works as it ahould. The documentation states "You can also associate more than one callback routine with the same control, but you must use then use index parameter to indicate which callback routine to use.", but this doesn't work when I set index to 2. Is there an index value that would do it?&lt;BR /&gt;&lt;BR /&gt;Throughout my project, a ? is used to generate a pick list for various edit controls, but with the four places I need to use a drop down list, I can't get it to work.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2011 10:22:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLGSETSUB-won-t-work-with-drop-down-box/m-p/806228#M40348</guid>
      <dc:creator>nvaneck</dc:creator>
      <dc:date>2011-10-25T10:22:56Z</dc:date>
    </item>
    <item>
      <title>DLGSETSUB won't work with drop-down box</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLGSETSUB-won-t-work-with-drop-down-box/m-p/806229#M40349</link>
      <description>Some of the code for DlgSetSub taken from DFLOGM that uses the index looks like this (idx being the optional index value)&lt;BR /&gt;&lt;BR /&gt;recursive function DlgSetSub( dlg, controlid, value, index ) result &lt;BR /&gt;!DEC$ ATTRIBUTES DEFAULT :: DlgSetSub&lt;BR /&gt;type (dialog), intent(inout) :: dlg&lt;BR /&gt; integer, intent(in) :: controlid&lt;BR /&gt; external value&lt;BR /&gt; integer, optional, intent(in) :: index&lt;BR /&gt; logical r&lt;BR /&gt; integer i, idx&lt;BR /&gt; if ( present(index) ) then&lt;BR /&gt;  idx = index&lt;BR /&gt; else&lt;BR /&gt;  idx = dlg_default&lt;BR /&gt; end if&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;if ( idx .eq. dlg_clicked .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_checkbox)&lt;BR /&gt;  if ( idx .eq. dlg_clicked .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_radiobutton)&lt;BR /&gt;  if ( idx .eq. dlg_clicked .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_edit)&lt;BR /&gt;  if ( idx .eq. dlg_change .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if (idx .eq. dlg_update) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(2) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if (idx .eq. dlg_gainfocus) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(3) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if (idx .eq. dlg_losefocus) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(4) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_scrollbar)&lt;BR /&gt;  if ( idx .eq. dlg_change .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_listbox)&lt;BR /&gt;  if ( idx .eq. dlg_selchange .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if (idx .eq. dlg_dblclick) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(2) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_combobox)&lt;BR /&gt;  if ( idx .eq. dlg_selchange .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if (idx .eq. dlg_dblclick) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(2) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if (idx .eq. dlg_update) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(3) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if (idx .eq. dlg_change) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(4) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if (idx .eq. dlg_gainfocus) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(5) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if (idx .eq. dlg_losefocus) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(6) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_droplist)&lt;BR /&gt;  if ( idx .eq. dlg_selchange .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if (idx .eq. dlg_dblclick) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(2) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_spinner)&lt;BR /&gt;  if ( idx .eq. dlg_change .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_slider)&lt;BR /&gt;  if ( idx .eq. dlg_change .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_tab)&lt;BR /&gt;  if ( idx .eq. dlg_selchange .or. idx .eq. dlg_default ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(1) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  else if ( idx .eq. dlg_selchanging ) then&lt;BR /&gt;  dlg % list(i) % callbackvalue(2) = loc(value)&lt;BR /&gt;  r = .true.&lt;BR /&gt;  end if&lt;BR /&gt; case (ctrl_activex)&lt;BR /&gt; case default&lt;BR /&gt;!DEC$ IF defined(DEBUG)&lt;BR /&gt;  stop "assert in module dialogm"&lt;BR /&gt;!DEC$ ENDIF&lt;BR /&gt; end select&lt;BR /&gt; end function DlgSetSub&lt;BR /&gt;&lt;BR /&gt;So you see the 'index' is not just sequence number but associates a particular callback routine (value) with a particular dlg_(whatever) value supplied as the 'index'. Particular types of controls allow the use of a particular set of dlg_(whatever) values. See 'Dialog control indexes' in the help. The pre-defined indexes given in the module DFLOGMT (in DFLOGM.f90) are&lt;BR /&gt;&lt;BR /&gt;! predefined index values for Get/Set functions&lt;BR /&gt; integer, parameter, public :: dlg_init  = 0&lt;BR /&gt; integer, parameter, public :: dlg_default  = -1&lt;BR /&gt; integer, parameter, public :: dlg_title  = -2&lt;BR /&gt; integer, parameter, public :: dlg_enable  = -3&lt;BR /&gt; integer, parameter, public :: dlg_clicked  = -4&lt;BR /&gt; integer, parameter, public :: dlg_state  = -5&lt;BR /&gt; integer, parameter, public :: dlg_change  = -6&lt;BR /&gt; integer, parameter, public :: dlg_update  = -7&lt;BR /&gt; integer, parameter, public :: dlg_range  = -8&lt;BR /&gt; integer, parameter, public :: dlg_rangemax = -8&lt;BR /&gt; integer, parameter, public :: dlg_position = -9&lt;BR /&gt; integer, parameter, public :: dlg_selchange = -10&lt;BR /&gt; integer, parameter, public :: dlg_bigstep  = -11&lt;BR /&gt; integer, parameter, public :: dlg_smallstep = -12&lt;BR /&gt; integer, parameter, public :: dlg_numitems = -13&lt;BR /&gt; integer, parameter, public :: dlg_dblclick = -14&lt;BR /&gt; integer, parameter, public :: dlg_destroy  = -15&lt;BR /&gt; integer, parameter, public :: dlg_rangemin = -16&lt;BR /&gt; integer, parameter, public :: dlg_tickfreq = -17&lt;BR /&gt; integer, parameter, public :: dlg_gainfocus = -18&lt;BR /&gt; integer, parameter, public :: dlg_losefocus = -19&lt;BR /&gt; integer, parameter, public :: dlg_selchanging = -20&lt;BR /&gt; integer, parameter, public :: dlg_addstring = -21&lt;BR /&gt; integer, parameter, public :: dlg_textlength = -22&lt;BR /&gt; integer, parameter, public :: dlg_idispatch = -23&lt;BR /&gt; integer, parameter, public :: dlg_sizechange = -24&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Oct 2011 11:08:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLGSETSUB-won-t-work-with-drop-down-box/m-p/806229#M40349</guid>
      <dc:creator>anthonyrichards</dc:creator>
      <dc:date>2011-10-25T11:08:35Z</dc:date>
    </item>
    <item>
      <title>DLGSETSUB won't work with drop-down box</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLGSETSUB-won-t-work-with-drop-down-box/m-p/806230#M40350</link>
      <description>Thanks. &lt;BR /&gt;&lt;BR /&gt;There doesn't seem to be anything in the dialog overview and explanations I can find that helps. There is only one call back routine set for the drop-down list box. It is never called, whether no index argument, or index set to DEL_SELCHANGE, OR DLG_DBLCLICK which are allowed for a dropdown list. &lt;BR /&gt;&lt;BR /&gt;Nothing is in the tables for DLGSETSUB, except under DLGSETSUB it says you can use an index for a second call, but there is no explantion of the index there and there is NO call to the DLGSETSUB routine at all when a character is typed.&lt;BR /&gt;&lt;BR /&gt;I'm hoping I'm missing something here, as there is no satisfactory way to do this I can find. What I want to happen is to allow a selection from the list, or to type in something new--all of which works fine. But I also want to invoke the callback routine when something new, e.g., a "?", is typed.</description>
      <pubDate>Tue, 25 Oct 2011 12:47:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLGSETSUB-won-t-work-with-drop-down-box/m-p/806230#M40350</guid>
      <dc:creator>nvaneck</dc:creator>
      <dc:date>2011-10-25T12:47:32Z</dc:date>
    </item>
  </channel>
</rss>

