I have a standard TStringGrid on a form. I have one Fixed Row in the grid that contains a number of columns, which are all TGridColumns objects. I have set the column titles using the object inspector and the default orientation is horizontal. Is there any way you can make the orientation vertical (like you can in cells in Excel)?
How can you change the text orientation in cells in the fixed rows in a Delphi TStringGrid
4.4k Views Asked by user1174918 At
1
There are 1 best solutions below
Related Questions in LAZARUS
- Exception raised when setting caption property in next form by user-defined procedure
- How to get the parent directory path of a path in FreePascal/Lazarus?
- How to get running process in Lazarus
- Threads: Send data to a specific active thread
- Lazarus/FreePascal, Synapse send file to TCPBlockSocket
- Making an SDL Viewport with LCL
- Odd sharing access violation (OS Error 32) with Freepascal implementation of libEWF
- Custom TEdit with input restrictions
- Math and physic in programing
- Lazarus: fatal error when opening an "output" procedure in another procedure
- How to make link button in Lazarus?
- Remove delay when continuously pressing a key
- Not Run wince Lazarus TI Cortex-A9
- glReadPixels always returns a black image
- True free heap not what it should be after ShellExecute
Related Questions in TEXT-RENDERING
- Delphi Android Text render bug?
- Graphics.DrawString - not work fontfamily text format
- Text "pops" thicker in Chrome after CSS animation is completed
- Text auto refreshing in google chrome (rendering issue)
- Thai fonts rendering
- Cant seem to render multiple lines in pygame on a sprite
- How can you change the text orientation in cells in the fixed rows in a Delphi TStringGrid
- What underlying graphics library for text output Sublime Text is using?
- CSS transformed (rotated) text looks not anti-aliased in Chrome and Firefox (Windows)
- Text not rendering correctly - OpenGL using FreeType2
- Supporting complex text layout with OpenType fonts in Android
- Center a label on any form VB.NET
- Height Difference between characters while displaying using font file
- How to use math sympy symbols in aiogram?
- Ugly character in NSMenuItem's key equivalent
Related Questions in TSTRINGGRID
- Deleting a selected row via mouse click in TStringGrid using delphi
- TStringGrid with SpeedButtons
- How can I detect when a user is finished editing a TStringGrid cell?
- Delphi: auto addition in StringGrid
- FillRect doesn't paint the complete TStringGrid cell in Delphi XE2
- delphi xe2 stringgrid with comments
- ListView and coloring cellls
- Stringgrid with buttons
- How can you change the text orientation in cells in the fixed rows in a Delphi TStringGrid
- How to call procedure with multiple parameters?
- Selecting the contents of a cell in an FMX Stringgrid in the same way as you can "SelectAll" in an Edit box
- Change color of font of TStringGrid's cell
- Retrieve values from database to StringGrid
- Problem with horizontal scrolling on TStringGrid
- Why don't child controls of a TStringGrid work properly?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Here's how to render the first row's text vertically in Lazarus:
Here's how to render the first row's text of the
TStringGridvertically in Delphi:I would prefer to use the overriden
DrawCellprocedure because it seems to me as the easiest way to go because if you want to render the text simply in theOnDrawCellevent then you should consider:DefaultDrawingset toTruethen the text will already be rendered when theOnDrawCellevent is fired, so here I would recommend e.g. to store the cell captions in a separate variable, not intoCellsproperty so then no text will be rendered and you can draw your own stored captions verticallyDefaultDrawingset toFalsethen you'll have to draw the whole cell by your own, including the 3D border, what is IMHO not so cool, and I would personally prefer to let the control draw the background for usHere is the Delphi code which uses the overriden
DrawCellprocedure. The text is being centered inside of the cell rectangle; please note that I haven't used theDrawTextExfor text size measurement because this function doesn't take the changed font orientation into account.And here's how it looks like: