TBitBtn disabled and glyph (XE7) [Edit]

According to the docs, if you have only one glyph, it is used for all states of the button.

However I am not finding this to be true.  As soon as I set the button state to disabled, even in the designer, the glyph disappears.

Am I going to have to work around this (bug?) (documentation error?) by changing my glyph to be twice as wide, a duplicate of itself, and set the number of glyphs to 2?

Edited by: Alan Marryat on Jul 23, 2015 10:43 AM
0
Alan
7/23/2015 2:43:25 PM
embarcadero.delphi.vcl.using 2297 articles. 1 followers. Follow

3 Replies
440 Views

Similar Articles

[PageSpeed] 35

Alan Marryat wrote:

> According to the docs, if you have only one glyph, it is used for all
> states of the button.
> 
> However I am not finding this to be true.  As soon as I set the
> button state to disabled, even in the designer, the glyph disappears.

Check the setting of the NumGlyph property of the button. It should be
set to 1, but if you had previously loaded a  glyph bitmap with two
glyphs it may still be set to 2.

Even if you have only one glyph and the property is 1 the VCL will draw
the bitmap disabled if the button is disabled, and depending on the
bitmap you may end up with something that is barely visible (if at all)
on a standard gray button surface...



-- 
Peter Below (TeamB)
0
Peter
7/23/2015 5:07:04 PM
> {quote:title=Peter Below wrote:}{quote}
> Alan Marryat wrote:
> 
> > According to the docs, if you have only one glyph, it is used for all
> > states of the button.
> > 
> > However I am not finding this to be true.  As soon as I set the
> > button state to disabled, even in the designer, the glyph disappears.
> 
> Check the setting of the NumGlyph property of the button. It should be
> set to 1, but if you had previously loaded a  glyph bitmap with two
> glyphs it may still be set to 2.
> 
> Even if you have only one glyph and the property is 1 the VCL will draw
> the bitmap disabled if the button is disabled, and depending on the
> bitmap you may end up with something that is barely visible (if at all)
> on a standard gray button surface...
> 
> 
> 
> -- 
> Peter Below (TeamB)

I've tried with another glyph.  Looks like if the glyph has no dark colors in it, it becomes invisible.

I'll have to change some colors.

Edit - what I have done is outlined the shape by making the edges black.  Black doesn't become invisible when disabled, so now you see an outline of the glyph.  That works fine for me.

Thanks.

Edited by: Alan Marryat on Jul 23, 2015 1:27 PM
0
Alan
7/23/2015 5:28:50 PM
I would suggest making your glyphs wider and using the NumGlyphs property to let your button know you have done this.  Then you have 100% complete control over how they render in the various states.  It's easy to do using just about any bitmap editor by simply making your glyph 2x the number of pixels wider, and then copying the original graphic over to the new area, and graying it out by hand.  (Or, make your glyph 3x, or 4x wider if you want to also capture other states such as when the mouse is holding
 the button down.)
0
Carl
7/29/2015 10:58:00 PM
Reply:

Similar Artilces:

How do i get the font color of a TGroupBox when using vcl styles in XE7? [Edit]
I'm writing a Win32 app in XE7 using the VCL Luna Style. Sometimes a group box will need its caption color changed to alert the user that the data in the group box is required. So it's easy enough to set the StyleElements to [seBorder,seClient]. That allows me to change the font color and style. But then I want to change it back to the original color, the same color as other group box captions that are set to [seFont,seBorder,seClient]. So how do I get the font color of a TGroupBox when using VCL styles? This is what I've tried: {code} procedure TfrmMain.FormCreate(Sender: T...

Cannot use Microsoft Excel when a Delphi application that uses automat. run [Edit]
Dear all, I built an application that connect to an Excel file using a OleObject: Excel := CreateOleObject('Excel.Application'); LCID := GetUserDefaultLCID; all works fine but I cannot use Microsoft Excel externally when my application is running. If I try to open another xls file, Excel tries to open the file in my Delphi application in read only mode. It does not even show it properly but opens a weir transparent application. I just want to be able to use Excel externally and I'd like the instance opened by my Delphi application to be independent from other Exc...

Problem using InstallAware 7 CodeGear Special Edition with Delphi 2010 [Edit]
Hi Everyone, I am trying to create an installation disk for my delphi 2010 application using the installAware that kind of comes with Delphi 2010. When I try to built it, it keeps giving me the error message:- No files matching pattern "C:\Windows\system32\\*120.bpl" and when I look into my windows\system32 folder, there the files with extension *.bpl end with *140.bpl and not *120.bpl like it was expected. Can anyone tell me if I am doing something wrong or how I can get around this. Thanks in advance. Edited by: Tat Hon Chu on Dec 3, 2009 12:55 AM > {quo...

TBitBtn disabled and glyph
According to the docs, if you have only one glyph, it is used for all states of the button. However I am not finding this to be true. As soon as I set the button state to disabled, even in the designer, the glyph disappears. Am I going to have to work around this (bug?) (documentation error?) by changing my glyph to be twice as wide, a duplicate of itself, and set the number of glyphs to 2? ...

To use or not to use Delphi
Sadly, it seems to me that there is a sort of race between the two threads, for and against using Delphi in new projects, with more or less the same users posting in both threads. Arguments are fiercely debated in both camps. Borland had their own vision. As a community, now that Delphi has changed ownership I believe we should try to be more consistent, more clear, and more articulate in what we expect from Embercadero in terms of Delphi. We can contribute to keeping Delphi alive and moving in the right direction. "Laurent Cocea" schrieb: > Sadly, it seems to me that there ...

using lib .so in Delphi XE7
I needed a help, if possible ??? It is this: I have a routine written and compiled in C ++ that make data sync a bank with any SQL lite on Windows, one console TCP IP data exchange between environments. Routine name: libfastsync.so (This routine is the client of my console) Question: How do I incorporate this routine into the Delphi XE7 and use it in my application,,,, u have a sample outside call? I know it's possible,,, so,,, do not know how beginner stuff !! Would have an example of this call? Since already thank you Thank you for Remmy tip, but most have some doubts ...

FastReport VCL for Delphi XE7
Hello everyone, Where can I download a proper version of FastReport VCL for Delphi XE7 Professional? Thanks Vladimir > {quote:title=Vladimir Nelenson wrote:}{quote} > Hello everyone, > Where can I download a proper version of FastReport VCL for Delphi XE7 Professional? > Thanks > Vladimir FR Trial here: http://www.fast-report.com/en/download/fast-report-vcl-5/ Registered users can download FR 5.1.7 with XE7 support here: http://cp.fast-report.com > FR Trial here: http://www.fast-report.com/en/download/fast-report-vcl-5/ > Registered users can download FR 5....

ANN: The free to use kbmMW 3.51.00 CodeGear Edition and kbmMemTable v. 7.00.01 Beta 1 CodeGear Edition for Delphi XE, has been released!
We are happy to announce the immediate availability of the free to use kbmMW v. 3.51.00 CodeGear Edition and kbmMemTable v. 7.00.01 CodeGear Edition for Delphi XE! The keywords for this release are: - Delphi XE support - Highly optimized performance in master/detail and ranges in kbmMemTable. - New GroupBy function in kbmMemTable. - Improved support for fielddefinitions with data, even in master/detail relations - Performance enhancements - Multithreading enhancements - Dataset enhancements - Stability enhancements and bugfixes Remember the free kbmMemTable CodeGear Edition ...

Disable editing using dynamic data.
Hello \There is a special table in which I wouldnt like the user to edit. Just delete or insert.How can I disable editing using attributes? using System.ComponentModel;using System.ComponentModel.DataAnnotations;namespace Sodexo.Data{    [MetadataType(typeof(ContractAssetMetaData))]    [DisplayColumn("Contract", "Contract", false)]    public partial class ContractAsset    {        public string AssetName         {     &...

Delphi 7 and Disable Themes? [Edit]
Not sure if this belongs in this section. I have an app right now that works perfect in XP.. works fine in Vista / win7 with themes turned off. Until I have time to help rewrite some custom drawing mods to a bunch of controls, I need it to disable aero and themes related actions that are taken place on the whole application. (only to the application, not system wide, if thats possible) This is bandaid yes, but need it done asap to get a few people up and running, until time can be put into the app to make a bunch of changes. This is using Delphi 7. Edited by: steven chesse...

Delphi XE7 TIBDatabase.SysEncryptPassword [Edit]
Hello everyone, I have noticed after upgrading from Delphi XE6 to XE7, that TIBDatabase successfully connects to my encrypted database without setting the SysEncryptPassword property. At the same time, if I set sys_encrypt_password parameter for TIBDatabase at design time (as I used to do in Delphi XE6), I am getting "DPB Constant () is unknown" error message. Connection is successful when I am not using sys_encrypt_password parameter Are SysEncryptPassword property and sys_encrypt_password parameter deprecated in Delphi XE7 release of IBX? Thanks Vladimir Edited by...

Delphi XE7: Error using TFDFBNBackup
Hi there! I would like to use *TFDFBNBackup* but I don't get it to work. I always get the following error message: +"Your user name and password are not defined. Ask your database administrator to set up a Firebird login."+ This is really surprising because when I try to setup a *TFDConnection* and a *TFDTable* with the same credentials it works perfectly. I double checked that I don't have a typo or something. Is there anything else I have to do in order to get *TFDFBNBackup* working? Here is my code: {code} try FDPhysFBDriverLink1.VendorLib := '...

On Using C++ code from Delphi [Edit]
Hello, one of the most frequently requested - but never realized - features for Delphi is the ability to use C++ code. I'd like to know about your needs regarding C++, and how you think about such a feature. - Is it critical for you to be able to use 3rd-party C++ libraries and C++ classes in Delphi without further changes or additional work? - Or do you want to use VCL components written in C++ in your Delphi projects? - Imagine a solution that makes C++ classes visible to Delphi code, with the following restrictions: o the C++ code needs to be built with C++Builder, o t...

Using WordApplication in Delphi 2010 [Edit]
Hello Everyone, I am having a problem with WordApplicatio component. I am using Delphi 10. I can get the WordApplication to open with the Document template that I select, but Word is behind my app and when I close Word I get an RPC Server not available errror and after that a pointer violation and then access violations until I reset the IDE. Here is the code I am using: procedure TTestLetterForm.Button1Click(Sender: TObject); var FileName: oleVariant; begin //Letter2Report.Print; if OpenDialog.Execute = True then begin FileName := OpenDialog.Fil...

Web resources about - TBitBtn disabled and glyph (XE7) [Edit] - embarcadero.delphi.vcl.using

Movement for the Intellectually Disabled of Singapore - Wikipedia, the free encyclopedia
MINDS ( Movement for the Intellectually Disabled of Singapore ) is a voluntary welfare organisation based in Singapore , that provides services ...

Facebook Disabled Website At HQ, Prompting Employees To Use Mobile
Facebook has been big on dogfooding its employees , and it appears the latest round came when the company shut off its website internally, forcing ...

Facebook Apologizes For Disabling Apps, Launches New Feedback Metrics, Granular Enforcement, Disabled ...
Facebook today apologized for suddenly disabling certain apps last month, saying that it “over-weighted certain types of user feedback, causing ...

American Veterans Disabled for Life Memorial - Flickr - Photo Sharing!
It's been a long time coming, but it's finally here. A well-deserved addition to DC's Memorials.

Oklahoma Restaurant Owner Won't Serve "Freaks, F*ggots, Disabled" Or Those On Welfare - YouTube
Gary James, owner of Gary's Chicaros in Enid, Oklahoma, said, "I've been in business 44 years, I think I can spot a freak or a faggot." He said, ...

New policy to get disabled people into the workplace launched
The Ministry of Social Affairs has prepared the policy and legislation will follow. ABU DHABI // A national policy to get disabled people into ...

Barack Obama dedicates new momument to honour US's disabled veterans
... autumn Sunday in the heart of a city built around monuments to war, Barack Obama dedicated yet another, a memorial to America’s disabled ...

Deplorable exercise in ideology will hurt the disabled
An Australian Human Rights Commission ruling will force the closure of many enterprises.

'Cowards' beat disabled man, post video on victim's Facebook page
The video shows one man start to kick and punch the victim. The other man says: "Come on, hold up. Stop, bro" but the first man replies: ...

Islamic State Issues Fatwa Against Children with Down Syndrome, Murders 38 Disabled Infants
The Islamic State has reportedly issued a fatwa ordering the elimination of children with Down syndrome and other congenital disabilities.

Resources last updated: 12/21/2015 7:01:36 PM