How to reorder a wxWindowList obtained from GetChildren() function

I am building a GUI using wxpython where I am using wxribbon. I want my user to drag and reorder panels in a wxribbon page. So, according to me, the best way would be to reorder the wxWindowList according to the drag and drop panel. But I don’t know how to reorder a wxWindowList. It is not like python list. I have searched everywhere but didn’t find any answer which could solve my problem. It would be really helpful if anyone could guide me how to reorder them or could give me a different approach to solve my drag and drop problem.

Samyak Jain wrote:

I am building a GUI using wxpython where I am using wxribbon. I want my
user to drag and reorder panels in a wxribbon page. So, according to me,
the best way would be to reorder the wxWindowList according to the drag
and drop panel. But I don't know how to reorder a wxWindowList. It is
not like python list. I have searched everywhere but didn't find any
answer which could solve my problem. It would be really helpful if
anyone could guide me how to reorder them or could give me a different
approach to solve my drag and drop problem.

Tab traversal also uses the order of items in the child window list, so using the MoveAfterInTabOrder and MoveBeforeInTabOrder methods will manipulate the parent's child window list for you.

···

--
Robin Dunn
Software Craftsman

Dear Robin,

Thanks a lot for your reply. It works perfectly now. Thanks a lot.

···

On Wednesday, March 26, 2014 9:39:21 AM UTC+5:30, Robin Dunn wrote:

Samyak Jain wrote:

I am building a GUI using wxpython where I am using wxribbon. I want my

user to drag and reorder panels in a wxribbon page. So, according to me,

the best way would be to reorder the wxWindowList according to the drag

and drop panel. But I don’t know how to reorder a wxWindowList. It is

not like python list. I have searched everywhere but didn’t find any

answer which could solve my problem. It would be really helpful if

anyone could guide me how to reorder them or could give me a different

approach to solve my drag and drop problem.

Tab traversal also uses the order of items in the child window list, so
using the MoveAfterInTabOrder and MoveBeforeInTabOrder methods will
manipulate the parent’s child window list for you.


Robin Dunn

Software Craftsman

http://wxPython.org

Samyak