I’ve 2 questions regardind SWT:
-
is there a quick way to align toolbar to the right side of a window (at startup) ?
-
can I create a toolbar that occupies 100% with of the window ?
Thanks for help 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unfortunately, CoolBar does not have an alignment field. However it does have bounds, which can be used to align it to the right side and make it occupy the entire width of the window. CoolBar does not allow height to be over 21, so the height of the window dimensions must be taken into account to make it fill the window. To do this, compute the necessary client area size and then resize the shell accordingly. This thread might help with the resizing.
You can use this same logic to justify the coolBar to the right side of the screen.
Furthermore, some coolBar elements have alignment parameters in their constructors.
I hope this helped.