forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

%el combo box

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
mtwallet



Joined: 06 Jun 2008
Posts: 9

PostPosted: Thu Jan 15, 2009 4:38 pm    Post subject: %el combo box Reply with quote

I am trying to use %el as a list box with a user input that constantly shows the list box with the nearest item to the typed string highlighted.
Ideally a use of the arrow keys and enter should then select the item required.
I have related text that I have found within a Win32 API help document (shown below) which suggests that I am looking for the Combo with an Edit box. Even though this would appear to be a standard variant of a Combo box I cannot get %el to even display the list box whilst typing in the values.
Could you help please.
Cheers


The COMBOBOX statement creates a combination box control (a combo box). A combo box consists of either a static text box or an edit box combined with a list box. The list box can be displayed at all times or pulled down by the user. If the combo box contains a static text box, the text box always displays the selection (if any) in the list box portion of the combo box. If it uses an edit box, the user can type in the desired selection; the list box highlights the first item (if any) that matches what the user has entered in the edit box. The user can then select the item highlighted in the list box to complete the choice. In addition, the combo box can be owner-drawn and of fixed or variable height.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Thu Jan 15, 2009 5:41 pm    Post subject: Reply with quote

%el uses a standard Microsoft ComboBox control with the style CBS_DROPDOWN. As far as I know this does not automatically produce the effect that you are asking for. If you want to post a simple sample I will run some tests on it.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Sat Jan 17, 2009 3:41 pm    Post subject: Reply with quote

The standard Microsoft combobox control does not provide auto-completion. You can get auto completion when using Windows Forms under .NET but I am assuming that this is an extension for .NET only. It does not seem to feature in the original control.

You can do a little on your own, as illustrated by the following sample, but there is not a lot that you can do in Fortran using ClearWin+.

Code:
      WINAPP
      character*20 textArray(10),textCurrent
      common textArray,textCurrent
      integer cb
      external cb
      textArray(1) = "apples"
      textArray(2) = "bananas"
      textArray(3) = "charries"
      textArray(4) = "damsons"
      textArray(5) = "figs"
      textArray(6) = "grapes"
      textArray(7) = "kiwi"
      textArray(8) = "nuts"
      textArray(9) = "pears"
      textArray(10) = "tomatoes"
      iw=winio@('%^20el',textArray,10,textCurrent,cb)
      end

      integer function cb()
      character*20 textArray(10),textCurrent
      common textArray,textCurrent
      integer len
      len = len_trim(textCurrent)
      do i=1,10
        if(textCurrent(1:len)==textArray(i)(1:len))then
          textCurrent = textArray(i)
          exit
        endif
      enddo 
      cb = 1
      end
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group