Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorder columns #1061

Merged
merged 9 commits into from
Mar 22, 2016
Merged

Conversation

deaspo
Copy link
Contributor

@deaspo deaspo commented Mar 15, 2016

No description provided.

deaspo and others added 6 commits February 29, 2016 12:39
Pulling changes from the sub branch
… can make it to work better because the current user controls become messy if the data has several columns
@deaspo
Copy link
Contributor Author

deaspo commented Mar 15, 2016

@dannyparsons though this dialog works am not contented Could we have another user control specifically for this purpose, where we can reorder by moving columns up and down, Something like below:
suggestion

@dannyparsons
Copy link
Contributor

Yes something to move columns up and down is definitely what we want. Attached is the dialog me and Roger came up with. There is just a data frame selector and then all the columns are shown in their current order.
We then thought generally about where else we might need something like this: reorder factor levels, reorder data frames, manage models, manage graphs etc.
This led us to thinking that all these 'lists' could be displayed better within a grid as sometimes we may want multiple columns in the list, sometimes we want to edit it, sometimes read only etc.

So we suggest a new user control that is just a grid that fills the control. The control can then have methods like fill grid, set read only/editable, hide/show the tabs etc.
Then there's a second control that inherits from this control and also has the four arrow buttons (up, down and the double arrows move to top and bottom). So the arrows move the rows of the grid up and down. That's where we will need some code for swapping columns in a grid.

Quite a lot of dialogs will then use these controls for displaying lists in a grid. Do you want to create these two controls?

reorder

@deaspo
Copy link
Contributor Author

deaspo commented Mar 15, 2016

Yes I would like to, but I have a questions. Why put it in form of a grid? I would prefer list view.

@dannyparsons
Copy link
Contributor

Good question. I discussed with Roger and a list view seems sensible for the simple reordering of columns, data frames etc. So then it's just one user control with a list view and arrow buttons.
Some factor dialogs may still use a grid but we can decide on those details later.

@deaspo
Copy link
Contributor Author

deaspo commented Mar 20, 2016

Question, how do I TestOkEnabled with the new user control Reorder? @dannyparsons

@dannyparsons
Copy link
Contributor

Good question. What we need is a function of the reorder control that
returns True or False and use this for the TestOK. There's a few different
ways that function could work. It could simply test if the list view is
empty or not. Or a bit more complicated, it could test if the items in the
list are in a different order to when it started, and we say that Ok isn't
enabled if the list is in the same order as the start.
Either would be fine for now so happy to start with the simple
implementation so that you don't have to spend a lot of time getting it
working but up to you.

On 20 March 2016 at 21:02, Polycarp Okock [email protected] wrote:

Question, how do I TestOkEnabled with the new user control Reorder?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1061 (comment)

@deaspo
Copy link
Contributor Author

deaspo commented Mar 21, 2016

Updated it with new user control reorder

@@ -145,7 +145,7 @@ Public Class ucrReorder
Public Sub loadList()
Dim dfTemp As CharacterMatrix
Select Case strDataType
Case "column"
Case "all"
If ucrDataFrameList IsNot Nothing AndAlso ucrDataFrameList.cboAvailableDataFrames.Text <> "" Then
frmMain.clsRLink.clsEngine.Evaluate(ucrDataFrameList.cboAvailableDataFrames.SelectedItem & "=" & frmMain.clsRLink.strInstatDataObject & "$get_variables_metadata(data_name = " & Chr(34) & ucrDataFrameList.cboAvailableDataFrames.SelectedItem & Chr(34) & ", data_type = " & Chr(34) & strDataType & Chr(34) & ")[,1]")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, you could use the get_column_names method in the Instat object. This just takes a single argument for the data_name.

@deaspo
Copy link
Contributor Author

deaspo commented Mar 22, 2016

Made the modifications.

dannyparsons added a commit that referenced this pull request Mar 22, 2016
@dannyparsons dannyparsons merged commit 3de2224 into IDEMSInternational:master Mar 22, 2016
@deaspo deaspo deleted the reorderSheets/Columns branch April 25, 2016 06:57
lloyddewit pushed a commit that referenced this pull request Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants