Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make VirtualStringTree scrollbar visible?
    primarykey
    data
    text
    <p>I placed one VirtualStringTree(VST1) on form1 and added some data in it. The vertical scrollbar is visible regardless of the number of nodes and I did not do anything about default properties of node height. I then copied VST1 to form2 and named it as VST2 and there the scrollbar of the VST2 is no longer visible. I changed VST2's <code>parent</code> control and <code>align</code> property (I tested many times and can not remember the sequence of changing properties of align and its parent), I do not know how the scrollbar at last is shown. I then copied the VST2 to form3 and named it as VST3. And now, no matter how I tested, its vertical scrollbar can not be seen when data in VST3 is beyond its window view.</p> <p>There are too many properties of VST, what properties should I set?</p> <p>edit:</p> <pre><code>// vt is on form1, scrollbaroption.alwaysvisible:=false; // and vt can show vertical scrollbar, object vt: TVirtualStringTree Left = 1 Top = 1 Width = 353 Height = 301 Hint = 'Click header to sort' Align = alClient Header.AutoSizeIndex = 0 Header.DefaultHeight = 17 Header.Font.Charset = DEFAULT_CHARSET Header.Font.Color = clWindowText Header.Font.Height = -11 Header.Font.Name = 'MS Sans Serif' Header.Font.Style = [] Header.Options = [hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible] Indent = 3 ParentShowHint = False ShowHint = True TabOrder = 3 TreeOptions.MiscOptions = [toAcceptOLEDrop, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning] TreeOptions.PaintOptions = [toShowRoot, toThemeAware, toUseBlendedImages] TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect, toRightClickSelect] OnChange = vtChange OnCompareNodes = vtCompareNodes OnFocusChanged = vtFocusChanged OnFreeNode = vtFreeNode OnGetText = vtGetText OnGetNodeDataSize = vtGetNodeDataSize OnHeaderClick = vtHeaderClick OnLoadNode = vtLoadNode OnSaveNode = vtSaveNode Columns = &lt; item Position = 0 Width = 168 WideText = 'Type' end item Position = 1 Width = 80 WideText = 'Frequency' end item Position = 2 Width = 80 WideText = 'Percent' end item CheckBox = True Position = 3 Width = 80 WideText = 'Rank' end item Position = 4 Width = 80 WideText = 'Length' end item Position = 5 WideText = 'Syllables' end item Position = 6 end&gt; end end //tfvt is on form2, scrollbaroption.alwaysvisible:=true; // I tested both scrollbaroption.alwaysvisible:=true and false // yesterday it showed scrollbar, today it does not. // tfvt does not show vertical scrollbar. object tfvt: TVirtualStringTree Left = 1 Top = 138 Width = 737 Height = 227 Hint = 'Click header to sort' Align = alClient Header.AutoSizeIndex = 0 Header.DefaultHeight = 17 Header.Font.Charset = DEFAULT_CHARSET Header.Font.Color = clWindowText Header.Font.Height = -11 Header.Font.Name = 'MS Sans Serif' Header.Font.Style = [] Header.Options = [hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible] Indent = 3 ParentShowHint = False ScrollBarOptions.AlwaysVisible = True ShowHint = True TabOrder = 2 TreeOptions.MiscOptions = [toAcceptOLEDrop, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning] TreeOptions.PaintOptions = [toShowRoot, toThemeAware, toUseBlendedImages] TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect, toRightClickSelect] OnChange = tfvtChange OnCompareNodes = tfvtCompareNodes OnFocusChanged = tfvtFocusChanged OnFocusChanging = tfvtFocusChanging OnFreeNode = tfvtFreeNode OnGetText = tfvtGetText OnGetNodeDataSize = tfvtGetNodeDataSize OnHeaderClick = tfvtHeaderClick OnLoadNode = tfvtLoadNode OnSaveNode = tfvtSaveNode Columns = &lt; item Position = 0 Width = 80 end item Position = 1 Width = 80 end item Position = 2 Width = 80 end item CheckBox = True Position = 3 Width = 80 end item Position = 4 Width = 80 end item Position = 5 Width = 80 end item Position = 6 Width = 80 end&gt; end end end end // kwicvt is on form3, scrollbaroption.alwaysvisible:=true; // I tested both scrollbaroption.alwaysvisible:=true and false // Now kwicvt does not show vertical scrollbar. // object kwicvt: TVirtualStringTree Left = 32 Top = 24 Width = 433 Height = 317 Hint = 'Click header to sort' Header.AutoSizeIndex = 0 Header.DefaultHeight = 17 Header.Font.Charset = DEFAULT_CHARSET Header.Font.Color = clWindowText Header.Font.Height = -11 Header.Font.Name = 'MS Sans Serif' Header.Font.Style = [] Header.Options = [hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible] Indent = 3 ParentShowHint = False ShowHint = True TabOrder = 0 TreeOptions.AnimationOptions = [toAnimatedToggle] TreeOptions.MiscOptions = [toAcceptOLEDrop, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning] TreeOptions.PaintOptions = [toShowRoot, toThemeAware, toUseBlendedImages] TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect, toRightClickSelect] OnChange = kwicvtChange OnCompareNodes = kwicvtCompareNodes OnFocusChanged = kwicvtFocusChanged OnFreeNode = kwicvtFreeNode OnGetText = kwicvtGetText OnGetNodeDataSize = kwicvtGetNodeDataSize OnHeaderClick = kwicvtHeaderClick OnLoadNode = kwicvtLoadNode OnSaveNode = kwicvtSaveNode Columns = &lt; item Position = 0 Width = 80 end item Alignment = taRightJustify Position = 1 Width = 80 end item Alignment = taCenter Position = 2 Width = 80 end item CheckBox = True Position = 3 Width = 80 end item Position = 4 Width = 80 end item Position = 5 Width = 80 end item Position = 6 Width = 80 end&gt; end </code></pre> <p><strong>[Edit]:</strong> </p> <p>Thank ain first.</p> <p>I tested carefully and found that if I call the same function for more than once, from the second time on, that virticalscrollbar will appear. Something like: </p> <pre><code>function fill; begin // filling VST; end; function button1click; begin fill; end; </code></pre> <p>I click button1 for the first time, verticalscrollbar does not appear; if for the second time or more, it shows perfectly.</p> <p>Why?, how to solve it?</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload