Positioning a listdlg away from the default centre of screen

Is there any way that I can move/reposition a listdlg dialog box?
I’m using a listdlg as my main menu - which is working fine, but it appears in the middle of the screen:

[t, ok] = listdlg (“ListString”,menuc,“Name”,“SMA/BOM/SAPN data analysis package”,…
“ListSize”,[480, 300],“PromptString”,[pstr yearmon],“SelectionMode”, “Single”,…

This limits my options for drawing other figures without the menu over-writing them. I’d like to have the listdlg on the left side of the screen (or the right - just out of the middle).

I don’t think movegui will work as the listdlg doesn’t have a handle I can pass to movegui, and I’ve tried putting “Position” in the listdlg options but it doesn’t accept them.

I’m running Octave 5.2.0 X86_64-w64-mingw32 on a windows 10 machine build 19041.867

I don’t know if it is possible to set the position of a listdlg. Afaict, it is not.
Instead, you could write a custom function that could use a uicontrol("style", "listbox") (and some uicontrol("style", "pushbutton") with respective callbacks) and position its parent figure on screen.

Yeah, now I’m pushing on the boundary of my programming skills.
I’ve tried to use uicontrol and the related functions before with no joy - hence the use of listdlg as my main menu instead of a flashy user interface. I found the time spent trying to make a ui work was not a good use of my limited spare time for this project, so I went with a listdlg that did what I needed.
Can you recommend somewhere that provides help / advice / examples of how to use the ui functions?

There is a page with examples on the Wiki: Uicontrols - Octave

1 Like