Re: [lazarus] StringGrid.ClientWidth does not count scroll bar
Joao Morais wrote: The ClientWidth method does not count the vertical scroll bar width. Is this by default? This is inconsistent with Delphi, so if this is by default I know I need to implement a workaround =) The ClientWidth is the space available for client controls, no ? The vertical scrollbar occupies some of that space, so it makes sense the ClientWidth is excluding the scrollbar. I'm not sure whether this is on purpose, but for example on gtk, the scrollbar is outside the control usually, but on win32, it's drawn inside the control. Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] StringGrid.ClientWidth does not count scroll bar
Also note that if you are working with widths in the grids/cells, that the GridLineWidth is 50% implemented. It draws the grid lines based on that value, but then eats into the cell space, which doesn't take into account the GridLineWidth (always assuming 1). Graeme. On 15/06/07, Micha Nelissen [EMAIL PROTECTED] wrote: Joao Morais wrote: The ClientWidth method does not count the vertical scroll bar width. Is this by default? This is inconsistent with Delphi, so if this is by default I know I need to implement a workaround =) The ClientWidth is the space available for client controls, no ? The vertical scrollbar occupies some of that space, so it makes sense the ClientWidth is excluding the scrollbar. I'm not sure whether this is on purpose, but for example on gtk, the scrollbar is outside the control usually, but on win32, it's drawn inside the control. Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] StringGrid.ClientWidth does not count scroll bar
Graeme Geldenhuys wrote: Also note that if you are working with widths in the grids/cells, that the GridLineWidth is 50% implemented. It draws the grid lines based on that value, but then eats into the cell space, which doesn't take into account the GridLineWidth (always assuming 1). I'm aware of this. My implementation works perfectly using vcl. Thanks. -- Joao Morais _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] StringGrid.ClientWidth does not count scroll bar
Micha Nelissen wrote: Joao Morais wrote: The ClientWidth method does not count the vertical scroll bar width. Is this by default? This is inconsistent with Delphi, so if this is by default I know I need to implement a workaround =) The ClientWidth is the space available for client controls, no ? The vertical scrollbar occupies some of that space, so it makes sense the ClientWidth is excluding the scrollbar. I thik you mean including the scrollbar. Don't think so. I see a scrollbar like a component finish instead a space to the user. I need to know how many pixels I have to distribute my string grid columns, and a scroll bar will make a mess of my calculations whenever the number of grid lines will be greater than the client height. I'm not sure whether this is on purpose, but for example on gtk, the scrollbar is outside the control usually, but on win32, it's drawn inside the control. Nice point! So what about a standard behavior? (btw my gtk1 and win32 implementations are drawing the scrollbars inside the control) Thanks. -- Joao Morais _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] StringGrid.ClientWidth does not count scroll bar
Hello, The ClientWidth method does not count the vertical scroll bar width. Is this by default? This is inconsistent with Delphi, so if this is by default I know I need to implement a workaround =) Thanks. -- Joao Morais _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives