[Gambas-user] Scrolling and Repositioning a Dirview control by code
Jorge Carrión
shordi at ...626...
Mon Mar 31 11:22:37 CEST 2014
Hi
I've a problem with a Dirview. When you call the .newfolder method, Dirview
allows you type the name in the list of folders by inserting a textbox in
its alfabetical place into the folder's list...
BUT if you folder list is bigger than the view and the place of "New
Folder" isn't visible, nothing happens.
Then the user must scroll manually the folder list until the place of the
"New Folder" is visible and invocate the .newfolder method.
I've tried to scroll the list by code, but unsuccesfully. I've tried a lot
of things like this:
public <http://gambasdoc.org/help/lang/public>
function<http://gambasdoc.org/help/lang/function>btnaddFolder
_Click()
dim <http://gambasdoc.org/help/lang/dim> t
as<http://gambasdoc.org/help/lang/as>
treeview<http://www.google.com/search?hl=en&q=treeview+site:http://gambasdoc.org/&btnI=I%27m%20Feeling%20Lucky>
t=miDirView.Children[0]
t.movefirst
while <http://gambasdoc.org/help/lang/while> t.current.text < "New
Folder"
t.movenext
wend <http://gambasdoc.org/help/lang/wend>
t.current.ensurevisible
miDirview.NewFolder()
end
Someone can show me a example tu scroll an repositioning a treeview?
Thanks in advance.
Shordi
More information about the User
mailing list