file ordered by the sequence mouse selecting

조회 수: 3 (최근 30일)
Roger
Roger 2015년 5월 13일
댓글: Roger 2015년 5월 14일
there r several files ,for example,b.txt, c.txt , e.txt, a.txt;
i want to order them by the mouse selecting sequence.
first select c.txt, then a.txt, then e.txt, then b.txt then the order is c -> a->e-> b,
but i use uigetfile then they are not ordered by what i want.
are there any ways ?
  댓글 수: 3
Guillaume
Guillaume 2015년 5월 13일
I'll reiterate what I've said in your duplicate of this question:
Giving the order the user click on items in "File Open" dialog any kind of meaning is a very poor user experience. What if you realise near the end that you've forgotten one file? You have to start from scratch.
Letting the user drag and reorder the files into a listbox is a much better user interface and it's trivial to get the file order from the listbox content (it's simply the order they are in).
Roger
Roger 2015년 5월 14일
thanks you two ,@Guillaume, is there any other way of 'letting the user drag and record teh files into a listbox ' , or as @Jan Simon said below?

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2015년 5월 13일
uigetfile does not reply the files in the order you select them. So you have to call uigetfile with selecting 1 file each time until the user hits cancel.
Or try to modify FEX: uipickfiles .
Get a list of files with dir and store the names in a reorderable listbox .

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by