Page 1 of 2

New TABS

Posted: Mon Feb 11, 2008 8:51 am
by Robert Frank
I'm testing new version of fwh (2008.02)

I've just found part of my code which doesn't work.
Error code BASE/1132

@oWNDR:nHeight() - 180, 195 TABS oTabs2 ;
PROMPTS "","Dodaj pacjenta","Zlecenia","Edytuj pacjenta","Wydrukuj wynik","Ksero kodu kreskowego","Karta stałego klienta","Wpisz błąd" ;
OF oWndR SIZE oWNDR:nWidth() - 140,20 PIXEL COLORS GET_LAB_KOL(61),GET_LAB_KOL(60);
ACTION (ACT_TAB2(oTabs2:nOption),oTabs2:nOption:=1)

When I remove "PIXEL" my code works.

I've never notice this error with FWH 2008.01.


Any suggestion?

Posted: Mon Feb 11, 2008 9:26 am
by Antonio Linares
Robert,

> Error code BASE/1132

Please post the calls stack

Here we have added the PIXEL clause to samples\TestTabs.prg and it works fine

Posted: Mon Feb 11, 2008 9:27 am
by nageswaragunupudi
I got curious when I saw your post. I normally do not use pixel clause.

Just now I tested both with and without pixel clause. It is working for me without any problem. ( 8.02 version )

But after the Tabs Statement I also use oWnd:oBottom := oTabs. May be without this there may be problem, but I think it is necessary to put the tabs at the bottom or top or left or right of the container.

Can you please post the error.log please?

Posted: Mon Feb 11, 2008 9:30 am
by nageswaragunupudi
I confirm that it is necessary to use oWnd:oBottom := oTabs.
( bottom, top, left or rght). Without that we are getting this error

Posted: Mon Feb 11, 2008 9:33 am
by Robert Frank
Antonio

Application
===========
Path and name: C:\FWH_MYAP\Maraboot\F_MAIN.exe (32 bits)
Size: 3,570,688 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 11.02.2008, 09:50:24
Error description: Error BASE/1132 BˆĄd zakresu tablicy: Nieprawidˆowa liczba argument˘w
Args:
[ 1] = A { ... }
[ 2] = N 0

Stack Calls
===========
Called from: TABS.PRG => TTABS:PAINT(0)
Called from: TABS.PRG => TTABS:DISPLAY(0)
Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
Called from: TABS.PRG => TTABS:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => UPDATEWINDOW(0)
Called from: WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from: MDICHILD.PRG => TMDICHILD:ACTIVATE(0)
Called from: f_dzien1.prg => LISTA_OSOB(293)
Called from: F_MENU.prg => (b)BUILDMENU(166)
Called from: MENU.PRG => TMENU:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: MDIFRAME.PRG => TMDIFRAME:COMMAND(0)
Called from: => TMDIFRAME:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: F_MENU.prg => MENU_GLOWNE(158)
Called from: F_MAIN.prg => MYAPP(134)

Posted: Mon Feb 11, 2008 9:34 am
by Robert Frank
nageswaragunupudi wrote:I confirm that it is necessary to use oWnd:oBottom := oTabs.
( bottom, top, left or rght). Without that we are getting this error
Nageswaragunupudi
Thank you.

Posted: Mon Feb 11, 2008 9:57 am
by Antonio Linares
Robert,

We are reviewing the Method Paint() to see where the error comes from,

thanks for your feedback

Posted: Mon Feb 11, 2008 11:30 am
by Robert Frank
There is another problem with new tabs.

In previous version of tabs (look at the picture 1) Polish national signs were displayed correctly.
Image

In new version I cannot find font do display it correctly.

Image

Posted: Mon Feb 11, 2008 11:51 am
by Antonio Linares
Robert,

You have to do oWnd:oBottom := oTabs

Posted: Mon Feb 11, 2008 12:01 pm
by Robert Frank
Antonio Linares wrote:Robert,

You have to do oWnd:oBottom := oTabs
I can't do it. Tabs are displayed in message area in my window.

Image

What about national signs?
Any idea?

R.

Posted: Mon Feb 11, 2008 12:12 pm
by nageswaragunupudi
We can not say oWnd:oBottom := oTabs, if we have a message bar, because already oWnd:oBottom is omsgbar.

Likewise we can not say oWnd:oTop := oTabs if we have a buttonbar because ownd:oTop is already TBar object.

To have all of them what I do is this:

Define buttonbar and message bar of oWnd,
Then I create a panel

oPanel := TPanel():new()
oWnd:oClient := oPanel

Now we can define all other controls as "OF oPanel" instead of oWnd. oPanel now acts as an invisible Container within the client area of the oWnd.
oPanel:oBottom := oTabs
Or
oPanel:oTop := oTabs

oPanel:oClient := oBrw
and so on

We can now have ButtonBar, MessageBar, Tabs on bottom, top, right or left and all other controls in the client area

Posted: Mon Feb 11, 2008 12:26 pm
by Antonio Linares
Robert,

Please download FWH 8.02 again and try your original code, thanks

Posted: Mon Feb 11, 2008 12:33 pm
by Antonio Linares
Robert,

> What about national signs?

Were they properly shown with the previous class version ?

Posted: Mon Feb 11, 2008 12:49 pm
by Robert Frank
Antonio Linares wrote:Robert,

> What about national signs?

Were they properly shown with the previous class version ?
Antonio:
Yes, they were.

My old code works!

NageswaraRao:
Great idea, I'm going to use it.

Posted: Mon Feb 11, 2008 12:56 pm
by nageswaragunupudi
Mr Robert

If you are going to use TPanel, a few advices from my experience.

Panel does not automatically inherit font from the parent window. So please set oPanel's font same as oWnd's font.

Then all the controls you define later as "OF oPanel" will automatically inherit that font. This makes your life easy