Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moverbar
Message
De
19/04/2018 06:00:21
 
 
À
17/04/2018 19:37:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01659460
Message ID:
01659532
Vues:
69
For the history, here is snap-shot of the solution I decided on (see attachment). But thank you again for the code example. I cut-and-pasted into a prg for future reference.

It is a shame that this site drop the ability to email yourself a copy of current page here. It use to be a one click thing. But I guess this is practice is the latest thing. With each new release of a web site or application, one must remove some of the popular features. This site is no exception. My online TV guide has elected not to display the atual channel number any more. My latest version of my online email service drop the flag that would tell me if the receiver actual received and opened my message. Many of the online News papers have drop their comment section. etc, etc, etc, I guess they are directing their sites to cell phones now.

SET RANT OFF

>Once again, Thanks.
>
>I decided to redo it with the Grid. There are a few assed feature I was planning for the future, so decided to move forward and add them now. These feature would require additional column that work independent of each other. The Grid not only eases this but provides the platform for it and any other extension later.
>
>I idea is to allow the user to define the order they row are to be processed. With the grid, Dbl-Clicking the row caption set a temporary column with a number; placing a incremental number of the next in line. First select is '1', Second as '2', and so on. Luckily, they will only be selecting less then 5 of them. Also, if they feel they made mistake, they can Reset and start over. Think the Interactive Ordering of controls on a form as provided by VFP. I am trying to keep it simple and intuitive. Also it will provide a means to retain the last setting between sessions.
>
>BTW. This is a Index designer tor a New Task List application. This will allow the Developer / Tester to sort the Issues (tasks) anyway they like.
>
>Once again, thanks to you and all.
>
>
>>>>>Thanks.
>>>>>You are doing the same thing I am doing. This made me rethink the issue. What I discovered is in another part of the form. In the Listbox I am placing a Picture to represent CheckBoxes. When the user click the list item, the checkbox is toggled from checked to not. But if I move any of the items, the licking is getting confused, and may result in a different item getting checked instead the intended one. This then results in the wrong item getting the concatenated string. I need to code review my code as to why and where this is occurring.
>>>>>
>>>>>Again thanks for show me that I was looking in wrong place.
>>>>
>>>>Do you store the item state somewhere in the list, or do you rely solely on the associated Picture?
>>>
>>>Currently, it has been the Picture. I thought it would ride with the Item. But I finding it doesn't. The two have little to do with each other, I see.
>>>
>>>Besides, future plans involve addition columns, and click the item, anywhere, informs the toggling of the Picture. I need it to only be the Checkbox itself. This will require the Grid control. So, back to the drawing board. I am using the Grid control in other place in the application as a kind of pick list. I guess this is going to be one too.
>>>
>>>Thanks
>>
>>In that case, you'll lose the capability of moving the items around.
>>
>>This is a rewriting of my first demo. By double clicking, the user can now change the state of each item, which is graphically represented by a smiley. Only the smiling smiley items are selected for the final result, in the order the user arranged them.
>>
>>For other operations, I guess you could add side bar command buttons and/or a right click menu.
>>
>>
>>LOCAL Demo AS ReadMovedItems
>>
>>m.Demo = CREATEOBJECT("ReadMovedItems")
>>m.Demo.Show(1)
>>
>>DEFINE CLASS ReadMovedItems AS Form
>>
>>	ADD OBJECT MoveableList AS ListBox WITH MoverBars = .T., Top = 10, Left = 10, Height = 100, Width = 200
>>	ADD OBJECT Result AS TextBox WITH Top = 120, Left = 10
>>	ADD OBJECT Done AS CommandButton WITH Top = 150, Left = 10, Caption = "Done!"
>>
>>	FUNCTION MoveableList.Init
>>
>>		This.AddItem("One")
>>		This.List(1, 2) = ".T."
>>		This.Picture(1) = HOME(0) + "Graphics\Icons\Misc\FACE02.ICO"
>>		This.AddItem("Two")
>>		This.List(2, 2) = ".T."
>>		This.Picture(2) = HOME(0) + "Graphics\Icons\Misc\FACE02.ICO"
>>		This.AddItem("Three")
>>		This.List(3, 2) = ".T."
>>		This.Picture(3) = HOME(0) + "Graphics\Icons\Misc\FACE02.ICO"
>>
>>	ENDFUNC
>>
>>	FUNCTION MoveableList.DblClick
>>
>>		IF EVALUATE(This.List(This.ListIndex, 2))
>>			This.List(This.ListIndex, 2) = ".F."
>>			This.Picture(This.ListIndex) = HOME(0) + "Graphics\Icons\Misc\FACE04.ICO"
>>		ELSE
>>			This.List(This.ListIndex, 2) = ".T."
>>			This.Picture(This.ListIndex) = HOME(0) + "Graphics\Icons\Misc\FACE02.ICO"
>>		ENDIF
>>
>>	ENDFUNC
>>
>>	FUNCTION Done.Click
>>
>>		LOCAL ItemIndex AS Integer
>>		LOCAL Result AS String
>>
>>		m.Result = ""
>>		FOR m.ItemIndex = 1 TO Thisform.MoveableList.ListCount
>>			IF EVALUATE(Thisform.MoveableList.List(m.ItemIndex, 2))
>>				m.Result = m.Result + Thisform.MoveableList.List(m.ItemIndex)
>>			ENDIF
>>		ENDFOR
>>
>>		Thisform.Result.Value = m.Result
>>
>>	ENDFUNC
>>
>>ENDDEFINE
>>
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform