MultiLine Grid Header

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MultiLine Grid Header

Post by Pablo César »

As we know, this is not possible in our actual grid control.
MultiLine Grid Header.png
MultiLine Grid Header.png (7.82 KiB) Viewed 4650 times
Then reading at little bit more at: Multi-line (merged) datagridview header I saw this that it could interesting to be read:

Difference between datagridview and listview control :o

Whos knows this could let us to reach another proper results ? It could ? :?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: MultiLine Grid Header

Post by Rathinagiri »

DataGridView is from Windows Forms (.Net) and not Win32 API.

I think it requires fundamental changes to HMG library.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MultiLine Grid Header

Post by Pablo César »

Yes, I think so...

Thank you Rathi for your reply
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3166
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: MultiLine Grid Header

Post by serge_girard »

Nice idea Pablo, now I use labels to simulate this effect.
It works actually very fine, labelfont, color etc. is, of course, no problem.
You only have to keep them together..
Serge
There's nothing you can do that can't be done...
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: MultiLine Grid Header

Post by Rathinagiri »

Serge,

Can you show me how?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MultiLine Grid Header

Post by Pablo César »

There is something of curious in this demo (based on ..\SAMPLES\Controls\Grid\GRID_18).

I just over-wrote the 02.bmp file with larger size it simulates two lines.

When run the builded demo, enlarged image can diffusely be displayed. But when we go to first menu option (Change Column 1 Header Image) displays litle better but in column 1 and two. :?

The big question (most probably Claudio can gives his opinion & tip): Height of grid header, did not changed... :|

If we could control the height of the header by the size of the image, it would be more interesting to use HEADERIMAGES. :P
Attachments
GRID_18.rar
(2.24 KiB) Downloaded 243 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3166
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: MultiLine Grid Header

Post by serge_girard »

Rathi, This is very simple and basic:

just put a LABEL at (for example) 10,10 and your GRID at 30,10 then. It's a bit dirty.
Then do the same for each column in the grid!

Serge
There's nothing you can do that can't be done...
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

mol

Post by mol »

My minigrid sample can be used for small number of rows. It uses labels so every cell can have different font, color etc.
One of limitations is that user can't change width of column.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

mol

Post by Pablo César »

mol wrote:One of limitations is that user can't change width of column.
Hi Marek, of course you can. By LISTVIEW_SETCOLUMNWIDTH C function.

You will find examples at:

viewtopic.php?p=38572#p38572
viewtopic.php?p=36639#p36639
viewtopic.php?p=17016#p17016

And at HMGDoc:

- New Set Properties:
 
            <ParentWindowName>.<GridControlName>.ColumnHEADER           ( nColIndex )  := cColumnHeader
            <ParentWindowName>.<GridControlName>.ColumnWIDTH            ( nColIndex )  := [ nColumnWidth ] |
                                                                                                                        [ GRID_WIDTH_AUTOSIZE ] |
                                                                                                                        [ GRID_WIDTH_AUTOSIZEHEADER ]
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: MultiLine Grid Header

Post by mol »

I was writing about my minigrid based on labels
Post Reply