I have a form with TStringGrid component on it. Property Scrollbars of TStringGrid is set to ssBoth. If i make the window smaller, scrollbars doesnt appear. Instead of this client area of TStringGrid is cropped. I would prefer if scrollbars were disabled if application window has enough size and automatically enabled if I shrink window size under critical value. Do you have any idea what I am doing wrong?
thruthseeker got it. If you haven't either anchored the grid, or otherwise auto-scale it to the size of the window, then it won't change size with the window, and thus won't have its own scroll bars.
Related
I have a frame with a panel.
on the panel is a tchart graph and custom panel that overlays the graph (so it's on top of the graph, with the user toggling which one is showing).
Additionally, I have 3 other panels that contain text, that user also toggles visible/not visible.
the problem: starting in Delph 10.4, the panel is showing sections of the chart. the problem didn't exist in Delphi Seattle (and untested in 10.2 and 10.3), but in 10.4, I can't show the 3 panels without showing sections of the chart.
To replicate, add a panel to a form, put a chart on the panel. add a second panel to the form, not visible, with some text. add a right click menu to set the panel visible. sections of the chart are 'bleeding through' the panel. This also happens with group boxes.
this is what it looks like:
question is: how can I get the panels to show correctly?
How I want it to look:
I can reproduce this in Delphi 10.3 Rio
This happens only if the panel is added as child control of the TChart component and has its ParentBackground property enabled (enabled by default).
I'm guessing that TChart background is drawn with transparency at some level. And when ParentBackground property of any child component is enabled backgroud of such components is also drawn using transparency.
Disabling the ParentBackground property of your Panels will solve your problem.
Using Delphi XE7 Firemonkey
I've dropped a TMemo on a blank form and then added more lines of text to the TMemo than it can hold (so that scrolling is necessary).
On Windows everything works as expected. The vertical scroll bar appears when the TMemo has more lines than can be displayed.
On Mac, nothing visual appears where the scroll bar should be.
I can click on the TMemo and use the mouse wheel to scroll. I can also press the up and down arrow keys on the keyboard to scroll.
What would prevent the scrolling tools from appearing when the mouse is hovering over the TMemo?
You need to set the AutoHide property to False.
See http://docwiki.embarcadero.com/Libraries/Rio/en/FMX.Memo.TMemo.
I'd like to scroll an individual TabSheet within a PageControl if the height of the sheet becomes less than a value.
If I put a ScrollBox on the TabSheet, the themed background of the TabSheet is not painted (it's overwritten by the single color background of the scrollbox).
I've been trying to find / create a transparent scrollbox component with no luck. Any other ideas?
I'm using Delphi 7.
Thanks!
To answer my own question, TMS has a transparent scrollbox component called "TAdvScrollBox" that works with themed tabsheets too:
http://www.tmssoftware.com/site/asb.asp
Maybe this will help somebody:
There is a small bug with the component that turns the ParentCtl3d property to false causing ListViews to be rendered with a black border instead of a 3d one. It's easy to fix by setting ParentCtl3d to true programmatically on FormCreate.
In the image snippet below, there is a splitter-sash between the tan Output window and the blue Command Line Args window. The user can change the width of the blue window (by dragging the splitter sash) if desired, but I want the blue window to maintain its width if the app is resized, that is, the tan window does all the horizontal shrinking and growing.
In my XRC file for the app, I have a BoxSizerH containing a vertical splitter. The splitter holds two panels. Each panel contains a StaticBoxSizerV holding a multi-line text control.
What must I do to allow the user to fix the width of the right-most window?
Do I need to trap resizes and set the sash position to maintain the last trapped splitter drag, or is there an easier way just using initial settings?
Checkout wxSplitterWindow::SetSashGravity in the docs:
http://docs.wxwidgets.org/trunk/classwx_splitter_window.html#a3c52925dffd02509d110086d4bb29373
By setting a MIM_MAXHEIGHT with SetMenuInfo, I can control the max height of a [popup]menu. When the menu appears, if it needs more height than MIM_MAXHEIGHT, it will have 2 scrollbuttons (one at the top, the second at the bottom)
I do draw myself the menuitems to theme them with various flavours.
But my OnDrawItem or OnMeasureItem are never called for drawing the scrollbuttons.
So my question is : How to ownerdraw the scroll buttons in a scrollable Tmenu (or Tpopupmenu)? Is it even possible?
Looking at the MSDN documentaiton, I don't think you can not owerdraw those buttons, as they are not part of the menu items, but of the menu itself.
The menu itself only has very few flags you can define; the only modify the background.
This link describes (an English translation of) how to to this.
Or this link on the Embarcadero forum.
What is possible is to set a background color to the menu (MIM_BACKGROUND) and giving to the hbrBack member a Tbrush.handle with a predefined color.
that is not perfect but often, themes use a single color to backgroud the menuitems. By this way, the scroll buttons will be colored with the background color