Source language: Translate to:

HPW Utility Tab Control

Questions about NeoBook PlugIns

Moderator: Neosoft Support

HPW Utility Tab Control

Postby ebear » Sat Sep 28, 2013 2:52 pm

Dear Hans-Peter,

I'm using hpwUtility to create Tabs in my project. The tab-control is working perfect, but I have a little problem with images in the Tabs.
If I use your [1] - [2] - [3] png images from the sample it fine, but if I use some others it looks like the images are placed over each other (First tab is fine, second tab has the images from the first tab below the second tab image etc.)
Second problem is that the images I use are transparent, but if I use them in tab-control they have a white background.

Are there special specs for the png images?

Best regards,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: HPW Utility Tab Control

Postby HPW » Sat Sep 28, 2013 10:35 pm

Hello,

Hard to tell without your code.
So post the code lines where you config the Images.

And be aware that there is no Support for the defined transparency of a png file.
(This would need to write the Bitmap with 32bit color deep and alpha channel support, currently it is 24 only)
The png is readed like any other of the supported Bitmap formats.

Have you set:

hpwUtilitySetvar "[hpwTabControlImgMaskColor]" "clRed"

When set this key-Color is used as the Color to detect transparent areas.
(When not set the bottom left Pixel is used)(when i remember correctly)

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: HPW Utility Tab Control

Postby ebear » Sun Sep 29, 2013 3:31 am

Hello Hans-Peter,

See below my code,

Code: Select all
hpwUtilitySetVar "[hpwTabControlFontSize]" "16"
hpwUtilitySetVar "[hpwTabControlFontName]" "Calibri"
hpwUtilitySetVar "[hpwTabControlImageList]" "[PubDir]1.png|[PubDir]2.png|[PubDir]3.png|[PubDir]4.png|[PubDir]5.png"
hpwTabControlCreate "Tab" "[_P100]|[_P200]|[_P300]|[_P400]|[_P500]" "tpTop" "tsTabs" "" "" "1" "GoSub [#34]P000_TabChange[#34]"


If I use your 1, 2 , 3 png images everything is ok. When i use my png images the problem accrues, without changing anything on the code.

I will try your instructions for the
Code: Select all
hpwUtilitySetvar "[hpwTabControlImgMaskColor]" "clRed"


I will let know...

Thanks a lot so far,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: HPW Utility Tab Control

Postby ebear » Sun Sep 29, 2013 12:30 pm

Hello Hans-Peter,

I wanted to use TabControl to replace the buttons I have now in my project. I tried your advice but the images are repeating on the Tabs. (1st tab is ok, 2nd tab has the chosen image and the image of the first tab in background, 3th tab has the image of the 1st and the 2nd tab in the background etc.) see also image.

Image

Im now using the following code:

Code: Select all
hpwUtilitySetVar "[hpwTabControlFontSize]" "16"
hpwUtilitySetVar "[hpwTabControlFontName]" "Calibri"
hpwUtilitySetVar "[hpwTabControlImageList]" "[PubDir]1.png|[PubDir]2.png|[PubDir]3.png|[PubDir]4.png|[PubDir]5.png"
hpwUtilitySetvar "[hpwTabControlImgMaskColor]" "clRed"
hpwTabControlCreate "Tab" "[_P100]|[_P200]|[_P300]|[_P400]|[_P500]" "tpTop" "tsTabs" "" "50" "1" "GoSub [#34]P000_TabChange[#34]"


The tabs are generated on the MasterPage and visible in all the pages:

Code: Select all
:P000_TabChange
   DisableObject "Tab"
   If "[Tab_TabIndex]" "=" "1"
       GotoPage "P100"
   EndIf
   If "[Tab_TabIndex]" "=" "2"
       GotoPage "P200"
   EndIf
   If "[Tab_TabIndex]" "=" "3"
       GotoPage "P300"
   EndIf
   If "[Tab_TabIndex]" "=" "4"
       GotoPage "P400"
   EndIf
   If "[Tab_TabIndex]" "=" "5"
       GotoPage "P500"
   EndIf
   EnableObject "Tab"
Return


Any idea whats going wrong.

Its not that important I can stay at the buttons I have now in the project, but I like the tabs...

Best regards,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: HPW Utility Tab Control

Postby HPW » Mon Sep 30, 2013 1:42 am

Hello,

Can you post or send your tab images, so I can try to reproduce the problem?

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: HPW Utility Tab Control

Postby ebear » Mon Sep 30, 2013 11:45 am

Hello Hans Peter,

I'm new to dropbox so I hope this link will be accessible for you. In the zip you will find the icons I used in the image.

Best regards, and thanks for your kind support.

Eric

https://www.dropbox.com/s/o25wq7wmz23tqbe/Icons.zip
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: HPW Utility Tab Control

Postby HPW » Mon Sep 30, 2013 1:29 pm

I can reproduce what you see, and it come from your PNG files.
What did you use to create them? NeoPaint 5?

Anyway, they are 32 bit PNG.
I opened them either in neopaint 4.7c od neopaint 5.1.1 and convert them to 24 bit PNG.
Then both sets load fine. The only thing I note that neopiant 4 converts the background to black and neopaint 5 convert it to white.

So I used:
hpwUtilitySetVar "[hpwTabControlImgMaskColor]" "clBlack"
or
hpwUtilitySetVar "[hpwTabControlImgMaskColor]" "clWhite"

So fact: TabControl does not support 32 bit PNG's.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: HPW Utility Tab Control

Postby ebear » Tue Oct 01, 2013 1:41 am

Hello Hans Peter,

Exactly this was the whole problem. Convert to 24bit and use (in my case) hpwUtilitySetVar "[hpwTabControlImgMaskColor]" "clBlack".
And... everything works.

Great, thanks a lot for your time to support me.

Best regards,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: HPW Utility Tab Control

Postby ebear » Tue Oct 01, 2013 1:26 pm

Hello Hans Peter,

Yet another question:

My main tabs, to switch between the pages are on the master page. Now I have also another tab control in one of my pages. The tabs are working fine but the images of the Tabcontrol in the master page are shown in the addition tabs.
Can I use more tab controls in one project, if yes what is going wrong with the images?

Thanks,

Eric


Sorry I found already the answer: Place an hpwUtilitySetVar "[hpwTabControlImageList]" "" in the code of the additional TabControl code.

Code: Select all
hpwUtilitySetVar "[hpwTabControlFontSize]" "12"
hpwUtilitySetVar "[hpwTabControlFontName]" "Arial"
hpwUtilitySetVar "[hpwTabControlScaled]" "1"
hpwUtilitySetVar "[hpwTabControlImageList]" ""
hpwTabControlCreate "P500_Tab_Rectangle" "By Order|By S/N" "tpTop" "tsTabs" "" "" "" "GoSub [#34]P500_TabChange[#34]"


Regards,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 0 guests