PC SOFT
ONLINE REPOSITORY
FOR WINDEVWEBDEV AND WINDEV MOBILE

Home |  | Sign in | English US
WD Moving elements between two list boxes - WD Movendo elementos entre duas caixas de listagem
Published by Boller
in the category Tools
New features



Description
WD Moving elements between two list boxes - WD Movendo elementos entre duas caixas de listagem


// Clears the list
ListDeleteAll(LIST_Memory)

// Fills the list
ListAdd(LIST_Memory, "Monday")
ListAdd(LIST_Memory, "Tuesday")
ListAdd(LIST_Memory, "Wednesday")
ListAdd(LIST_Memory, "Thursday")
ListAdd(LIST_Memory, "Friday")
ListAdd(LIST_Memory, "Saturday")
ListAdd(LIST_Memory, "Sunday")

///------------------------------------------------------------------


// Selects the 4th element of each list box (only if the list box is not empty)
// Memory list box
IF LIST_Memory..Occurrence > 0 THEN LIST_Memory = 4
// List box on source
IF LIST_ArraySource..Occurrence > 0 THEN ListSelectPlus(LIST_ArraySource, 4)

//-----------------------------------------------------------------------------------------------------------------


// If an element is selected in the list box
IF ListSelect(LIST_Memory) > 0 THEN

// Retrieves the selected element
InfoBuild("The element selected in the list box filled by programming is: %1.",LIST_Memory[LIST_Memory])

END


// If an element is selected in the list box
IF ListSelect(LIST_ArraySource) <> -1 THEN

// Retrieves the selected element
InfoBuild("The element selected in the list box on variable is: %1.", LIST_ArraySource[ListSelect(LIST_ArraySource)])


END

//-----------------------------------------------------------------------------

// Changes the caption of each list box
LIST_Memory..Caption = "Days :"

LIST_ArraySource..Caption = "Month of the year"

//-----------------------------------------------------------------------------

// Changes the color of the text for the rows of each list box

// Memory list box
LIST_Memory..Color = PastelRed


// List box on source
LIST_ArraySource..Color = PastelBlue
Illustrations, screen shots
none
none
User reviews
(To evaluate this resource, click 'Write a review')
No review or comment? Be the first one!