Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Motif Scrollable and H/V_SCROLL bars

Hi Randy,

You need to look at computeTrim().  This method computes the size a widget
needs to be in order to show a particular client area.  A better name for
this method would have been computeBounds(). <g>

Steve



                                                                                                                                           
                      hudsonr@xxxxxxxxxx                                                                                                   
                      Sent by:                        To:      platform-swt-dev@xxxxxxxxxxx                                                
                      platform-swt-dev-admin@         cc:                                                                                  
                      eclipse.org                     Subject: [platform-swt-dev] Motif Scrollable and H/V_SCROLL bars                     
                                                                                                                                           
                                                                                                                                           
                      06/19/02 03:13 PM                                                                                                    
                      Please respond to                                                                                                    
                      platform-swt-dev                                                                                                     
                                                                                                                                           
                                                                                                                                           



We are trying to calculate whether it is necessary to show scrollbars or
not. To do this, we do:
canvas.getHorizontalScrollbar().getSize().y

This works on Windows, but on Motif it doesn't work. The dimension returned
is too small, causing us to overestimate the resulting client area once the
scollbar is set visible.

How can I ask a Canvas how much space scroll bar "x" *would* occupy if it
were visible? In other words, what is the clientArea for the Canvas with
both scrollbars visible, but i want to know without setting them visible.
(Also, need to account for possible SWT.BORDER style bit).





Back to the top