Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Search Forums » Search Results » View Thread |
Messages 11 to 20 of 36 total |
Some Questions About TCheckBox |
Tue, Feb 6 2018 5:41 PM | Permanent Link |
Frederick Chin | Tim, /* property OnKeyDown; <<<<<<<<<<<<< property OnKeyUp; <<<<<<<<<<<<< */ I have added the two events above and in the OnKeyDown event, I inserted the code below:- lblStatus.Caption:=IntToStr(Key); where lblStatus is a TLabel. When I press ENTER (or any other key) in the TCheckBox, the label does not show anything. Am I missing a step? -- Frederick |
Thu, Feb 8 2018 3:12 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Frederick, << I have added the two events above and in the OnKeyDown event, I inserted the code below:- lblStatus.Caption:=IntToStr(Key); where lblStatus is a TLabel. When I press ENTER (or any other key) in the TCheckBox, the label does not show anything. >> Sorry, I forgot to mention - the base TControl class intercepts any <Enter> or <Space> keys and converts them into button clicks when the TControl.PushKeys property is set to True. All of the button controls have this functionality, including the TCheckBox control. However, you can expose this property by creating a new TCheckBox descendant control and publishing the PushKeys property: TMyCheckBox = class(TCheckBox) published property PushKeys; end; Then you can turn this functionality on or off, as necessary. Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 9 2018 5:39 PM | Permanent Link |
Frederick Chin | Tim, /* However, you can expose this property by creating a new TCheckBox descendant control and publishing the PushKeys property: TMyCheckBox = class(TCheckBox) published property PushKeys; end; Then you can turn this functionality on or off, as necessary. */ Thanks, it now works as expected. -- Frederick |
Fri, Feb 9 2018 5:52 PM | Permanent Link |
Frederick Chin | Uli, /* Modifying an interface has nothing to do with internals of EWB. There is no need to change the original interface. Just copy it to your procect directory or any folder in your search path and modify it so that it fits your needs. It will apply just for this project. */ I carried out the following steps to switch the caption with the check box of the TCheckBox but I am not getting expected results:- 1. Create a directory called j:\ewb\interfaces. 2. Copied the following files into the above directory from the default directory below EWB's interface directory:- tcheckboxindeterminate.wbi tcheckboxselected.wbi tcheckboxunselected.wbi 3. In EWB, open all three interface files from the new directory and switched the caption with the check box for all states. 4. Added the new directory in Environment | Options's Component Library's Search Paths and placed in before Elevate Web Builder 2\interfaces\default. 5. Closed and EWB prompted a rebuild because the search paths changed. Carried it out. 6. Created a new form and dropped the TCheckbox on to the form. The check box is still to the left but the default caption is now missing and I can't change it as it won't stick. Am I missing a step here? -- Frederick |
Sat, Feb 10 2018 5:02 AM | Permanent Link |
Uli Becker | Frederick, please post the modified interfaces. Sounds like a wrong layout.consumption property. Uli |
Sat, Feb 10 2018 8:49 AM | Permanent Link |
Frederick Chin | Uli, /* please post the modified interfaces. Sounds like a wrong layout.consumption property. */ Here they are. (Hmm...How to attach multiple files like you did?) -- Frederick Attachments: interfaces.zip |
Sat, Feb 10 2018 10:26 AM | Permanent Link |
Uli Becker | Frederick, > Here they are. (Hmm...How to attach multiple files like you did?) I use Thunderbird as newsreader. 2 issues with your modified interfaces: 1. You forgot to set the Layout.Position of the Icon to lpRightCenter (it's still lpLeftCenter) and Consumption to lcLeft instead of leRight. 2. The (right-aligned) Icon has to have LayoutIndex = 0 (not 1) Uli |
Sat, Feb 10 2018 6:02 PM | Permanent Link |
Frederick Chin | Uli, /* I use Thunderbird as newsreader. */ Aside from the multiple file attachment feature, how is it better than using the web browser? /* 2 issues with your modified interfaces: 1. You forgot to set the Layout.Position of the Icon to lpRightCenter (it's still lpLeftCenter) and Consumption to lcLeft instead of leRight. 2. The (right-aligned) Icon has to have LayoutIndex = 0 (not 1) */ Thanks. The changes allowed the modified interfaces to take effect. It is not obvious why the icon had to be laid out first but it sort of made sense after changing the 3 properties for more than 10 times. -- Frederick |
Mon, Feb 12 2018 9:05 AM | Permanent Link |
Frederick Chin | Uli, My modified TCheckbox interface to have the caption on the left works as desired but the original TCheckbox also has the caption on the left. Is there a way to have the original TCheckbox retain the caption on the right while my modified interface apply to a derived component from TCheckbox, which I call TMyCheckBox. -- Frederick |
Mon, Feb 12 2018 9:10 AM | Permanent Link |
Matthew Jones | Frederick Chin wrote: > which I call TMyCheckBox. Yes - you just need to define a new component and set its interfaces. The documentation has info on this - I think there may be an article on the web site too. Have a search, and ask if you can't find it. (I'm away from EWB myself at the moment so can't point you, sorry) -- Matthew Jones |
« Previous Page | Page 2 of 4 | Next Page » |
Jump to Page: 1 2 3 4 |
This web page was last updated on Friday, November 1, 2024 at 07:01 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |