como obtener el numero de linea

Discusión sobre NeoBook en español

Moderator: Neosoft Support

Locked
franco21
Posts: 129
Joined: Tue Jan 14, 2014 3:46 pm

como obtener el numero de linea

Post by franco21 »

como puedo obtener el numero de linea de un elemento al realizar una busqueda dentro de un listbok

yo busco una palabra dentro de toda la lista..
la ubica
quiero eliminar ese elemento pero como puedo obtener el numero de linea en la que se encuentra para poder eliminarlo????

No encuentro documentacion alguna no tengo idea

ejemplo:

ListBoxFindItem "Lista1" "[TextoABuscar]" "[Lista1]"

si lo encuentro como elimino el elemento?

En realidad necesito recorrer la lista elemento por elemento ver si existe ese texto y eliminar el elemento y seguir con el siguiente asi hasta finalizar el archivo

Alguna idea???
User avatar
virger
Posts: 540
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Re: como obtener el numero de linea

Post by virger »

Idea si...
1) ListBoxDeleteItem "ListBox" "[Posicion]"
2) LEER EL 'HELP'. o "AYUDA" QUE VIENE CON EL SOFTWARE, ¡Y has ejemplos trae!
COSTA RICA
PURA VIDA
franco21
Posts: 129
Joined: Tue Jan 14, 2014 3:46 pm

Re: como obtener el numero de linea

Post by franco21 »

Claro amigo eso esta correcto y la vi en el manual pero el problema no es como borro sino como se que linea borrar

yo busco me encuentra pero luego como se que linea es si lo que busco es un texto...

Mi problema es poder identificar en que linea se encuentra el texto de esa forma si implementar el borrado

Gracias
User avatar
virger
Posts: 540
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Re: como obtener el numero de linea

Post by virger »

Esto esta en el HELP/AYUDA
1) Primero
ListBoxFindItem
Purpose: Search for an item in a List Box or Combo Box object.
Category: Objects
Syntax:
ListBoxFindItem "object name" "item text" "variable"
Object name
The name of an existing List Box or Combo Box object.
item text
The text o f the item to find.
variable
The name of the variable to store the number of the found item. If no match is found, variable will contain 0 (zero).

Example:
The example below searches for a specific item and, if found, deletes the item:
ListBoxFindItem "ListBox1" "Herbert Hoover" "[Found]"

OJO AQUI ESTA TU RESPUESTA
If "[Found]" ">" "0"
ListBoxDeleteItem "ListBox1" "[Found]"
EndIf

2)Segundo
ListBoxDeleteItem
Purpose:Remove an item from a List Box or Combo Box object.
Category:Objects
Syntax:
ListBoxDeleteItem "object name" "line number"
object name
The name of an existing List Box or Combo Box object.
line number
The line number of the item to delete. The first item in the list is 1, the second item 2 and so on. All items after the deleted item will move up one. You can delete the entire list by using “All” instead of a specific line number.
Example:

ListBoxDeleteItem "ListBox1" "3"

CREO ESTA MUY CLARO, REPITO BUSCA Y LEE EL MANUAL/AYUDA
COSTA RICA
PURA VIDA
Locked