button backcolor

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2092
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: button backcolor

Post 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
Image
https://www.hmgforum.com/viewtopic.php?t=2397
have fun
Jimmy
franco
Posts: 858
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: button backcolor

Post 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.
All The Best,
Franco
Canada
User avatar
AUGE_OHR
Posts: 2092
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: button backcolor

Post by AUGE_OHR »

hi Franco,

as i can say BUTTONEX is based on KDJ Version of Ownbutton using BS_OWNERDRAW
have fun
Jimmy
franco
Posts: 858
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: button backcolor

Post 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.
All The Best,
Franco
Canada
User avatar
AUGE_OHR
Posts: 2092
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: button backcolor

Post 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.
have fun
Jimmy
User avatar
mol
Posts: 3757
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: button backcolor

Post by mol »

Can somebody place any working sample?
User avatar
AUGE_OHR
Posts: 2092
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: button backcolor

Post 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
have fun
Jimmy
franco
Posts: 858
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: button backcolor

Post 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.
All The Best,
Franco
Canada
franco
Posts: 858
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: button backcolor

Post by franco »

How do I place screenshot. No sure how.
All The Best,
Franco
Canada
Post Reply