![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Mon, Feb 25 2019 12:58 PM | Permanent Link |
Jose Verger Cybernav | Hello, is it possible to use the Progress Bar in Vertical direction ?
regards |
Tue, Feb 26 2019 1:56 AM | Permanent Link |
Bruno Larochelle | hi
i'm sure there are probably better practices, but i took the opportunity to 'poke around' in the source code of a (copy of) 'webprogs' to do this.. if nothing else, this was a useful exercise in playing around with components, and getting an appreciation of the magic of EWB! .. at least it was for me! so.. here it is .. 1. i made copies of 'webprogs.wbs' and 'tprogressbar.wbi' (from ewb 'library'), giving them new unique names ('webprogs_v.wbs' and 'tprogressbar_v.wbi'), and modified those new files to reflect the new name (replace 'ProgressBar' by 'ProgressBar_v') 2. modified the 'DoChanged' procedure code in the 'wbs' file: // BarElement.Width:=Round((FPosition/FMaxValue)*ClientWidth); BarElement.height:=Round((FPosition/FMaxValue)*ClientHeight); 3. install the 'new' component (EWB Library.. add component .. TProgressBar_v .. specify the new source..), then re-build the library 4. start a project, drop the new component on the form, and then open up the 'interface' editor (this is 2nd last icon on the controls at the top of the form..) 5. using the element 'base', change the default shape (to width 20, height 300) 6. using the element 'bar', change the layout to : position : lpBottomLeft, stretch : lsRight 7. close the interface, you will be prompted to save 8. rebuild the library and.. it works! .. a vertical progress bar One might suggest it would be better/smarter to modify the original 'webprogs' to include a new property (type = vertical or horizontal), and modify the code to accommodate that. Cybernav wrote: Hello, is it possible to use the Progress Bar in Vertical direction ? regards |
Tue, Feb 26 2019 2:06 AM | Permanent Link |
Bruno Larochelle | correction to step 1 .. you need to change the 'unit' name in the file..
Bruno Larochelle wrote: hi i'm sure there are probably better practices, but i took the opportunity to 'poke around' in the source code of a (copy of) 'webprogs' to do this.. if nothing else, this was a useful exercise in playing around with components, and getting an appreciation of the magic of EWB! .. at least it was for me! so.. here it is .. 1. i made copies of 'webprogs.wbs' and 'tprogressbar.wbi' (from ewb 'library'), giving them new unique names ('webprogs_v.wbs' and 'tprogressbar_v.wbi'), and modified those new files to reflect the new name (replace 'ProgressBar' by 'ProgressBar_v'). ALSO change the 'unit WebProgs;' to say 'unit WebProgrs_V; at the top of the file 2. modified the 'DoChanged' procedure code in the 'wbs' file: // BarElement.Width:=Round((FPosition/FMaxValue)*ClientWidth); BarElement.height:=Round((FPosition/FMaxValue)*ClientHeight); 3. install the 'new' component (EWB Library.. add component .. TProgressBar_v .. specify the new source..), then re-build the library 4. start a project, drop the new component on the form, and then open up the 'interface' editor (this is 2nd last icon on the controls at the top of the form..) 5. using the element 'base', change the default shape (to width 20, height 300) 6. using the element 'bar', change the layout to : position : lpBottomLeft, stretch : lsRight 7. close the interface, you will be prompted to save 8. rebuild the library and.. it works! .. a vertical progress bar One might suggest it would be better/smarter to modify the original 'webprogs' to include a new property (type = vertical or horizontal), and modify the code to accommodate that. Cybernav wrote: Hello, is it possible to use the Progress Bar in Vertical direction ? regards |
Wed, Feb 27 2019 12:06 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Bruno,
Nicely done, and exactly correct. A lot of customers get "stuck" on the control interfaces and creating/modifying them. And there are definitely some controls like the TGrid control that can be a bit complicated, but most of the controls really do just consist of a collection of building blocks (elements) that are nested together to form something greater, and all of the control interface elements use the same set of declarative properties. It's at least easier than dealing with the Win32 API for controls. ![]() Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, November 28, 2023 at 10:08 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |