Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: button color


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Feb 22, 2018 1:48 PM Last Post By: Jeremy North
peiman f

Posts: 106
Registered: 4/16/14
button color  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 21, 2018 2:29 AM
hello
how can i change button style like change color or use background image in a simple way?
i know we can use rectangle or image as button
but there isent any standard way !?
when thay dont assign a color property to buttons?!
Jeremy North

Posts: 402
Registered: 9/20/99
Re: button color  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 21, 2018 1:06 PM   in response to: peiman f in response to: peiman f
peiman f wrote:
hello
how can i change button style like change color or use background image in a simple way?
i know we can use rectangle or image as button
but there isent any standard way !?
when thay dont assign a color property to buttons?!

You would need to use styles to do this.

The styles have an elements png file so you can either recolour the button areas of the elements png of use a new png to get button colours.
In one app we have had multiple png files to represent different button types and also dynamically coloured the png content as well.
peiman f

Posts: 106
Registered: 4/16/14
Re: button color  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 22, 2018 1:01 AM   in response to: Jeremy North in response to: Jeremy North
Jeremy North wrote:
The styles have an elements png file so you can either recolour the button areas of the elements png of use a new png to get button colours.
In one app we have had multiple png files to represent different button types and also dynamically coloured the png content as well.

"edit Custom Style" of button dont have and png or rectangle for edit color
Jeremy North

Posts: 402
Registered: 9/20/99
Re: button color  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 22, 2018 1:48 PM   in response to: peiman f in response to: peiman f
peiman f wrote:
Jeremy North wrote:
The styles have an elements png file so you can either recolour the button areas of the elements png of use a new png to get button colours.
In one app we have had multiple png files to represent different button types and also dynamically coloured the png content as well.

"edit Custom Style" of button dont have and png or rectangle for edit color

You don't say what Delphi version you use (which is not helpful) but for Tokyo. Button styles changes between XE8 and Seattle and probably again for Berlin.

1. Perform Edit Custom Style
2. select the background element in the stylebook
3. Bring up the property editors fro FocusedLink, NormalLink, and PressedLink
This will show you how they reference the PNG style element and the positioning to form the background.

I don't think technically you are allowed to modify the default platform styles, but you can. Just extract them from the resource and you can change them as you like. Once extracted you can just look the style into the stylebook and see all of the styles available. You will see the PNG display in the style list and you can make changes to it with a image editor and update it into your style book.

You could also download the "Premium" styles from the embarcadero site and check those out.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02