Mailinglist Archive: yast-devel (59 mails)

< Previous Next >
Re: [yast-devel] Dynamic Dialog Box
Dne 16.5.2017 v 17:33 Srinidhi B napsal(a):
I recently found this:

Hope this is what you are looking for.

Yes, that's a good example of a dynamic dialog.

But keep in mind that the UI does NOT display a scroll bar when the widgets
do not fit into the dialog.

The Qt UI squeezes the widgets so they can even become unreadable, the ncurses
silently ignores them. That's pretty bad, some widgets might be missing
and users will not know about this issue.

If there is a high risk that the widgets will not fit into the dialog you should
experimentally find the maximum which fits and display an error if the current
exceeds that limit.

See e.g.

BTW the registration module tries to split the UI into two columns if one column
is not enough. This can help you to increase the limit of the maximum displayed
widgets at once.

Another solution is to use widgets which allow scrolling, e.g. Table,
MultiSelectionBox, Tree. (Maybe there are more of them.)

See e.g. the repository manager ("yast2 repositories"), there is a scrollable
with all repositories at the top. The widgets which modify the state
of the *selected* repository are displayed below the table.

The last possible solution is to use a RichText workaround. The RichText widget
allows scrolling, clicking the links return an user action just like button
presses and for check boxes and radio buttons you can use images.

But you need to implement all the logic for switching the widget states by
yourselves. E.g. ensure that only one radio button is selected.

See an example in the registration module:

However, this approach also has some disadvantages, see more details in

As this is really a workaround it should be used only when the previously
solutions fail because the displaying images instead of real buttons is a bit
and does not reflect the definitions in the Qt stylesheet for the real widgets.

Also the installation stylesheet might be different than in the running system
or in
the first boot mode. That might result in unreadable (black on black) text.
See the fix.



Ladislav Slezák
YaST Developer

SUSE LINUX, s.r.o.
Corso IIa
Křižíkova 148/34
18600 Praha 8
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups