#212713 - 2017-10-06 10:06 AM
[Kixforms-Classic TreeView] SelectedNode
|
AndreLuiz
Getting the hang of it
Registered: 2015-10-07
Posts: 89
Loc: Brasil, João pessoa
|
Kixforms-Classic 2.4.6
[PTBR] Olá a todo eu não estou conseguindo selecionar um node, não sei, mas acredito que seja a sintaxe que estou usando errado.
É desta forma que se usa, eu não entendi!
[ENG] Hello to all I'm not achieved, select a node, I do not know, but believe me it's a syntax that I'm using wrong.
This is how it is used, I do not understand!
$tree.nodes(1).SelectedNode
Edited by AndreLuiz (2017-10-06 10:09 AM)
|
Top
|
|
|
|
#212718 - 2017-10-06 09:57 PM
Re: [Kixforms-Classic TreeView] SelectedNode
[Re: Jochen]
|
AndreLuiz
Getting the hang of it
Registered: 2015-10-07
Posts: 89
Loc: Brasil, João pessoa
|
[PTBR] A minha árvore não possuí subárvores. e eu quero definir eu quero que um dos nós sejam selecionados. Você me entende?
[ENG] My tree has no subtrees. and I want to define I want one of the nodes to be selected. You understand me?
Ex: $tree.Nodes(0).text = 'ola' $tree.Nodes(1).text = 'ola1' $tree.Nodes(2).text = 'ola2' $tree.Nodes(3).text = 'ola3'
$tree.Nodes(2).selectedNode
[PTBR] Dá para entender com este exemplo o que quero fazer?
Obrigado desde já!
[ENG] Can you understand by this example what I want to do?
Thank you in advance! : D
|
Top
|
|
|
|
#212723 - 2017-10-07 07:12 AM
Re: [Kixforms-Classic TreeView] SelectedNode
[Re: Jochen]
|
AndreLuiz
Getting the hang of it
Registered: 2015-10-07
Posts: 89
Loc: Brasil, João pessoa
|
[PTBR] Olá, ainda não funcionou, veja só:
[ENG] Hello, it still did not work, see:
Break on
$system = createObject('kixtart.system')
$form = $system.Form()
$tree = $form.TreeView ;or, if you use the form as parent: $tree = $form.TreeView
$=$tree.Nodes.Add('ola')
$=$tree.Nodes.Add('ola1')
$=$tree.Nodes.Add('ola2')
$=$tree.Nodes.Add('ola3')
$form.Show
while $form.visible
$tree.SelectedIndex = 2
$tree.SelectedNode.index?
$=Execute($form.DoEvents(1))
loop
[PTBR] Ele deveria ter selecionado o "ola2", e não foi isso que ele fez, ele não seleciona nada, na verdade.
[ENG] He should have selected the "hello2", and that's not what he did, he does not select anything, actually.
|
Top
|
|
|
|
#212742 - 2017-10-12 12:52 AM
Re: [Kixforms-Classic TreeView] SelectedNode
[Re: Jochen]
|
AndreLuiz
Getting the hang of it
Registered: 2015-10-07
Posts: 89
Loc: Brasil, João pessoa
|
[PTBR] Obrigado!!!
Assim também funciona.
[ENG] Thank you!!!
So does it work.
Break on
$system = createObject('kixtart.system')
$form = $system.Form()
$tree = $form.TreeView
$=$tree.Nodes.Add('ola')
$=$tree.Nodes.Add('ola1')
$=$tree.Nodes.Add('ola2')
$=$tree.Nodes.Add('ola3')
$tree.SelectedNode = $tree.Nodes(2)
$form.Show
while $form.visible
$=Execute($form.DoEvents(1))
loop
|
Top
|
|
|
|
Moderator: ShaneEP, Mart, Radimus, Jochen, Allen, Glenn Barnas
|
0 registered
and 366 anonymous users online.
|
|
|