Re: EuGTK - fonts

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

Well, of course you can write your own filter routines, but GtkListView and GtkTreeView have those built-in. Euphoria's may actually be faster, we'd have to try both and see. The advantage of the built-in filters is that you can use a single list to display different 'sets' of the data in different views, so when you change an item, it is immediately updated wherever it appears.

Even though it's written for mono, there's a good tutorial about the list & view stuff. You can easily see how to translate it to Euphoria.

Now, for the input to your filter: seems like a GtkEntry would work, if the user needs to type something. When he hits enter, your routine to do the filtering could be called:

include GtkEngine.e 
 
function Foo(atom ctl) 
	puts(1,"You pressed enter!") 
	printf(1,"Control text is: %s\n",{get(ctl,"text")}) 
return 1 
end function 
 
constant win = create(GtkWindow) 
connect(win,"destroy",quit) 
 
constant input = create(GtkEntry) 
add(win,input) 
connect(input,"activate",call_back(routine_id("Foo"))) 
 
show_all(win) 
main() 

If you want the filter to update after every character is typed (instead of waiting for the enter key) change the "activate" signal to "changed"

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

Search



Quick Links

User menu

Not signed in.

Misc Menu