ListBox

HMG en Español

Moderator: Rathinagiri

Post Reply
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

ListBox

Post by danielmaximiliano »

Hola a todos :

estoy usando un Listbox para mostrar y seleccionar un proveedor de al seleccionarlo querria que se muestre en el primer lugar del ListBox ¿ es posible esto ?
busque en el foro y ejemplos pero no encontre lo que necesito.

Hello everyone:

I am using a Listbox to display and select a provider would want to select is displayed at the top of the ListBox is this possible?
search the forum and examples but did not find what I need.
Select :
2014-06-07 12_11_35-Agregar Nuevo Producto al Stock.jpg
2014-06-07 12_11_35-Agregar Nuevo Producto al Stock.jpg (42.07 KiB) Viewed 1078 times
Show :
100.jpg
100.jpg (38.39 KiB) Viewed 1078 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: ListBox

Post by andyglezl »

Hola Daniel

Se me ocurre que en el ON CHANGE borres del array el elemento que seleccionaste
y luego lo insertes en la primer posición del mismo array...

claro, no deberás tener la propiedad SORT
------------------------------------------------------------------------------------------------------
Hello Daniel

It occurs to me that in the ON CHANGE erase the array element you selected
and then insert in the first position of the array ...

course, you should not have the SORT property
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: ListBox

Post by danielmaximiliano »

good solution

!! gracias ¡¡
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: ListBox

Post by danielmaximiliano »

andyglezl wrote: Hello Daniel

It occurs to me that in the ON CHANGE erase the array element you selected
and then insert in the first position of the array ...

course, you should not have the SORT property
Hola Andy:
Una mejor manera de solucionar mi inconveniente fúe intercambiar el contenido del ListBox.
Recorde el viejo metodo de ordenamiento por burbuja y aplique una porcion de ese codigo.
-----------------------------------------------------------------------------------------
a better way to fix me was inconvenient exchange the contents of the ListBox.
I remembered the old method for bubble sort and apply a portion of the code.

Code: Select all

*-------------------------------------------------------------*
Function Selected()
*-------------------------------------------------------------*
Local nPos       := Agregar.List_1.value
Local cFirts      := Agregar.List_1.item( 1 )
   
   Agregar.List_1.item( 1 )         :=  Agregar.List_1.item( nPos )
   Agregar.List_1.item( nPos )    := cFirts


   Agregar.Text_8.Value :=  Agregar.List_1.item( 1 )
SSW code (Esgici)
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply