Looking at the code in Q100575, I tried to create a demo that would work with a vertical scroll box--but I could not get it to work. The scroll never occurs. Also, tabbing to a control out of the visible space does not work.
What is wrong with my code?
Thank you,
Ed Dressel
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Ed.
Thank you for your message.
This problem is caused by the fact that you define each frame's alignment. However, this is not quite correct to define it on TScrollBox. As a result, you see such behavior. To solve this problem, just replace your code with the following code:
var I: Integer; lFrame: TFrame; lEdit: TEdit; lbl: TLabel; begin // inherited; for I := 1 to 5 do begin lFrame := TFrame.Create(self); lframe.parent := ScrollBox1; lframe.Height := 100; lframe.Top := (I - 1) * 100; lbl := TLabel.Create(self); lbl.Parent := lframe; lbl.Caption := 'Test this #' + IntToSTr(I) + ':'; lbl.Top := 22; lbl.Left := 10; lEdit := TEdit.Create(self); lEdit.Parent := lframe; lEdit.Top := 20; lEdit.Left := lbl.Left + lbl.Width + 10; end; FVScrollBar := TcxScrollBar.Create(ScrollBox1); FVScrollBar.Parent := ScrollBox1.Parent; FVScrollBar.Align := alRight; FVScrollBar.Kind := sbVertical; FVScrollBar.Width := 16; FVScrollBar.SmallChange := ScrollBox1.VertScrollBar.Increment; FVScrollBar.LargeChange := ScrollBox1.ClientHeight; FVScrollBar.SetScrollParams(0, ScrollBox1.VertScrollBar.Range, 0, ScrollBox1.ClientHeight - 2); FPrevPos := FVScrollBar.Position; ScrollBox1.VertScrollBar.Visible := False; ScrollBox1.Color := RootLookAndFeel.Painter.DefaultContentColor; FVScrollBar.OnScroll := DoVScroll;
Hope, it will help you achieve the required functionality.
Please note: to get the correct behavior in all situations, you should implement all methods from the sample in the Q100575 (How to get a proper skinned scrollbox) report.
Best regards,
Ingvar.
D2007.
I tried the method you recommended (with uScrollBox), but the scroll box does not scroll when the active editor is out of the focused area.
See the attached example--if UseuScrollBox is not defined, tabbing through the editors in the scroll box works fine.If it is defined, it no longer works.
Ed Dressel
Hello Ed.
This behavior is not directly related to this unit. When the standard vertical scroll bar is invisible (ScrollBox1.VertScrollBar.Visible := False;), tabbing through the editors will not work.
I've modified your example to show it. Unfortunately, we can't change this behavior at our components level. However, we have a suggestion in our Support Center about providing the TcxScrollBox component, which will support skinning. Please review the Provide a skinnable component similar to the standard VCL TScrollBox component report for additional information.
You can start tracking this issue to stay informed on our progress.
Best regards,
Ingvar.
<quote>
When the standard vertical scroll bar is invisible (ScrollBox1.VertScrollBar.Visible := False;), tabbing through the editors will not work.
</quote>
This being a requirement, am I correct that there is no solution until Dev Ex develops a scroll box?
Hello Ed.
Thank you for the response.
I'm afraid that there is no solution. I've tried to place the TcxScrollBar over the standard scrollbar, but it causes painting issues.
Meantime, our developers are looking for the best way to implement this component. However, I can't give you any time frame when it will be added. So, please keep tracking this suggestion to be informed on our progress over it.
Best regards,
Ingvar.