Page 2 of 3
Re: button backcolor
Posted: Fri Nov 15, 2024 10:50 am
by AUGE_OHR
hi Franco,
you can use OWNERDRAW, for every Windows Control, to draw Your own Background and Style
look for
Owner button functions for HMG 3.4.3
Author: KDJ
Version: 2017-01-23
https://www.hmgforum.com/viewtopic.php?t=2397
Re: button backcolor
Posted: Sun Nov 17, 2024 5:19 pm
by franco
Thanks all, for thoughts.
I am going to use labels for now.
I was having trouble going from a grid with an outside label to a different browse, which used an new table.
The browse wanted the grids table. I forgot to DISABLE THE GRIDS WINDOW. It would work with a button but not with a label.
Disabling allowed it to work with a label. then enable when returning.
It would be nice to figure how to figure how to use the BUTTONEX with hmg by adding minigui.ch.
BUTTONEX IS AMAZING.
I think is is the compiling and linking which is beyond my knowledge.
I think you can do similar with C+, but still beyond my knowledge.
Re: button backcolor
Posted: Mon Nov 18, 2024 3:19 pm
by AUGE_OHR
hi Franco,
as i can say BUTTONEX is based on KDJ Version of Ownbutton using BS_OWNERDRAW
Re: button backcolor
Posted: Fri Nov 22, 2024 7:26 pm
by franco
Does anyone know of a way to us BT_DrawGradientFill the background of a label.
Basically like Jimmy`s second button. It would just make it not so bla.
Or a simpler BS_OWNERDRAW on a button or label.
Like
Code: Select all
DEFINE BUTTON OR LABEL
BACKCOLOR
BT_GRADIENTFILL *** OR ** BS_OWNER DRAW
END
I am finding BS_OWNERDRAW a bit confusing as it is designing the button.
I would just like to gradual color change after the button or label was created maybe by sending parameters to the draw.
Re: button backcolor
Posted: Sun Nov 24, 2024 2:14 pm
by AUGE_OHR
hi Franco,
you can´t set BS_OWNERDRAW after Create. the Type must be set at Create Time.
you seems not to understand Ownerdraw, it mean that all Action will be Problem of User, not SYSTEM any more.
it is not only Form, Style and Color you also need CODE for Action e.g. when got Focus or when lost Focus.
ownerdraw is allways need, when want a Control which look different than "normal by Windows"
ownerdraw is avaiable for every Windows Control.
Re: button backcolor
Posted: Mon Nov 25, 2024 5:59 pm
by mol
Can somebody place any working sample?
Re: button backcolor
Posted: Tue Nov 26, 2024 2:20 pm
by AUGE_OHR
hi Mol.
mol wrote: ↑Mon Nov 25, 2024 5:59 pm
Can somebody place any working sample?
https://www.hmgforum.com/download/file.php?id=7427
Re: button backcolor
Posted: Mon Dec 02, 2024 7:59 pm
by franco
I have decided to use labels. Either with a backcolor. I may also design some buttons in Minigui and make the labels transparent
and put a nice looking button under the label. This works very well. A little more work but looks good.
Re: button backcolor
Posted: Mon Dec 02, 2024 8:30 pm
by mol
Place screenshot
Re: button backcolor
Posted: Fri Dec 06, 2024 5:04 pm
by franco
How do I place screenshot. No sure how.