| View previous topic :: View next topic |
| Author |
Message |
Wrangler NeoBooker

Joined: 31 Mar 2005 Posts: 1331 Location: USA
|
Posted: Fri Jan 22, 2010 12:51 pm Post subject: HPWImage and Font Picker |
|
|
Hi Hans-Peter:
I've used both the fontbox and colorbox actions you added to hpwimage, and they work great! We've really been needing these for a long time.
When your time allows, would you consider making a seperate plugin using them? You could call it HPWPicker, or something like that. Other useful dialogs to add would be a datepicker and a calendar.
You would need to include the colorconverter as well, as it is needed to give neobook the format it needs with the colorbox action.
For those of you who haven't used these actions yet, or don't know they exist, implementing them is very easy. Hans has provided nice wizard dialogs to make it so. For example, to use the fontbox, it only takes a few lines of code:
hpwImageCreate "fontrectangle" "" "" "" "" "" "" ""
hpwImageFontBox "fontrectangle" "[fontname]" "[fontsize]" "[fontstyle]" "[fontchar]" "[fontname]" "[fontsize]" "[fontstyle]" "[fontchar]"
SetObjectFont "content" "Black" "[fontname]" "[fontsize]" "[fontstyle]" "[fontchar]"
The fontrectangle can be kept off screen as it will pop up in the center of the pub screen.
To save it when the program runs next time, write it to a config file:
../ write to config
FileWrite "[pubdir]config.cfg" "1" "[fontname]"
FileWrite "[pubdir]config.cfg" "2" "[fontsize]"
FileWrite "[pubdir]config.cfg" "3" "[fontstyle]"
FileWrite "[pubdir]config.cfg" "4" "[fontchar]"
and then read the config in Startup Actions. This can be used to change the font in any Neobook object that will allow it.
Thanks again, Hans-Peter! _________________ Wrangler
--------------
Before you criticize someone, walk a mile in their shoes. Then when you criticize them you're a mile away and you have their shoes. - Wrangler
Software made with NeoBook
http://highdesertsoftware.com |
|
| Back to top |
|
 |
Gaev NeoBooker

Joined: 01 Apr 2005 Posts: 4321 Location: Toronto, Canada
|
Posted: Fri Jan 22, 2010 2:08 pm Post subject: |
|
|
Wrangler:
Download the .zip file from this page ... http://www.scriptedlogic.com/neoFREE7.htm
After storing the gkvGetFonts file in NeoBook's Functions folder ... you can Call this Function from any pub with a command like this ... | Code: | | Call "gkvGetFonts" "TrueType" "[myFontList]" |
... the contents of the variable [myFontList] can then be loaded into any ListBox for the user to select. _________________ Gaev
http://www.scriptedlogic.com/ |
|
| Back to top |
|
 |
Wrangler NeoBooker

Joined: 31 Mar 2005 Posts: 1331 Location: USA
|
Posted: Fri Jan 22, 2010 2:15 pm Post subject: |
|
|
Thanks, Gaev. Does it allow selection of font size, style and character set? Hans-Peter's uses the default Windows font selector, giving it a professional look. _________________ Wrangler
--------------
Before you criticize someone, walk a mile in their shoes. Then when you criticize them you're a mile away and you have their shoes. - Wrangler
Software made with NeoBook
http://highdesertsoftware.com |
|
| Back to top |
|
 |
HPW NeoBooker

Joined: 01 Apr 2005 Posts: 1962 Location: Germany
|
Posted: Fri Jan 22, 2010 3:13 pm Post subject: |
|
|
| Quote: | | When your time allows, would you consider making a seperate plugin using them? You could call it HPWPicker, or something like that. |
What would be the benefit of a seperate plugin?
Is it the size of hpwImage?
The delphi font+color dialogs still need a form to be placed on, so it need a graphical plugin with a form.
So since time is limited, I am not sure if it worth to double the work. _________________ Hans-Peter |
|
| Back to top |
|
 |
Wrangler NeoBooker

Joined: 31 Mar 2005 Posts: 1331 Location: USA
|
Posted: Fri Jan 22, 2010 5:01 pm Post subject: |
|
|
Yes. It's the size. Not only do you need hpwimage, but also hpwutility if you use the colorbox to convert the color. _________________ Wrangler
--------------
Before you criticize someone, walk a mile in their shoes. Then when you criticize them you're a mile away and you have their shoes. - Wrangler
Software made with NeoBook
http://highdesertsoftware.com |
|
| Back to top |
|
 |
|