celestian
February 7th, 2019, 06:15
I am having some odd behavior with combobox within a subwindow.
In a Story window I've added a subwindow (author_header) above the typical "header" subwindow and attached the header to the bottom of the author_header. Within the author_header subwindow I've added 2 labels, a checkbox and a combobox.
When using the combobox that has a selection already (see animated gif below) the combobox opens but the view is slid down and the top of the combobox is pushed up where it's not visible. In the animation you can see that when I move the mouse up (when I go to the right side) to the author_header section and use mousewheel it will snap up to top and look normal.
Is there an event I can capture that I can then run "setScrollPosition(0,0)" on the subwindow and correct this when the combobox is opened? Or is there another way to deal with this?
https://i.imgur.com/003RMZq.gifv
https://i.imgur.com/003RMZq.gifv
The subwindow template and combobox template are nothing special but here they are:
<template name="note_author_header">
<subwindow>
<anchored>
<top offset="23" />
<left offset="15" />
<right offset="-15" />
</anchored>
<activate />
<fastinit />
</subwindow>
</template>
<template name="author_frameselect">
<combobox>
<script>
function onInit()
super.onInit();
addItems(AuthorManagerADND.aBlockFrames);
end
</script>
<anchored>
<top parent="rightanchor" offset="8" />
<left offset="45" />
<right offset="-90" />
</anchored>
<listdirection>down</listdirection>
<listmaxsize>8</listmaxsize>
</combobox>
</template>
In a Story window I've added a subwindow (author_header) above the typical "header" subwindow and attached the header to the bottom of the author_header. Within the author_header subwindow I've added 2 labels, a checkbox and a combobox.
When using the combobox that has a selection already (see animated gif below) the combobox opens but the view is slid down and the top of the combobox is pushed up where it's not visible. In the animation you can see that when I move the mouse up (when I go to the right side) to the author_header section and use mousewheel it will snap up to top and look normal.
Is there an event I can capture that I can then run "setScrollPosition(0,0)" on the subwindow and correct this when the combobox is opened? Or is there another way to deal with this?
https://i.imgur.com/003RMZq.gifv
https://i.imgur.com/003RMZq.gifv
The subwindow template and combobox template are nothing special but here they are:
<template name="note_author_header">
<subwindow>
<anchored>
<top offset="23" />
<left offset="15" />
<right offset="-15" />
</anchored>
<activate />
<fastinit />
</subwindow>
</template>
<template name="author_frameselect">
<combobox>
<script>
function onInit()
super.onInit();
addItems(AuthorManagerADND.aBlockFrames);
end
</script>
<anchored>
<top parent="rightanchor" offset="8" />
<left offset="45" />
<right offset="-90" />
</anchored>
<listdirection>down</listdirection>
<listmaxsize>8</listmaxsize>
</combobox>
</template>