Disable Combo

new topic     » topic index » view thread      » older message » newer message

Hello,

My understanding of a Combo is that it is really 2 Controls. 1.) An EditText and 2.) a List

What I would like to do is freeze the EditText part while allowing the List to work.

In other words I would like to select anything on the List and put it in the EditText but not be allowed to edit or change or click anything in the EditText.

I use the folling code to find the handler of the EditText,

 
global function find_editbox(integer combo) 
  object WGWords_Editbox-- Combo boxes are 'subclassed' by win32lib and its child is the editbox. 
   WGWords_Editbox=findChildren(combo) 
   for i=1 to length(WGWords_Editbox) do 
      if WGWords_Editbox[i][2] = EditText then 
        return WGWords_Editbox[i][1] 
      end if 
   end for  
  return 1 
end function 
 

And this code to mousetrap the Combo,

 
VOID = createMouseTrap(Window1,Combo3) 
 
procedure MouseTrap(integer self, integer event, sequence params) 
 setFocus(Combo3)--I'm not sure what to put here 
end procedure 
setHandler(Window1, w32HMouseTrap, routine_id("MouseTrap")) 
 

This seems to work pretty well but if I MouseClick in the EditText the text in the EditText becomes unhighlighted and the cursor blinks at the end of the text. Then if I hit the space bar the text in the EditText Changes. (Causing an error in my program).

I don't know if any of this helps or not.

Don Cole

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu