Multiline Folders

CharlesPratt
Posts: 38
Joined: Tue Jan 09, 2007 2:31 am
Location: Winston-Salem, NC

Multiline Folders

Post by CharlesPratt »

Antonio -
I have been able to get very nice multiline folders from resources with only some minor changes to Tfolder and by adding a function called TabGetRowcount() to tabctrl.c that I got from Rossine's modified sample file. No changes are needed in the redefine class, as the style is controled by the resources. All you need to do is to add "TCS_MULTILINE" to the style in the .RC file and windows does it automatically.

The only problen I have with this is when I use the RESIZE16 clause. When I do this, none of the controls on the first folder page appear. Clicking on the tab does bring the controls. Or, if I call one of the pages on the second row by setting the option to 5 on INIT, for example, the dialog[5] appears on the front row with all of it's controls. Any of the rear pages appear on the front with controls, and none of the first row pages that are called by the option method appear with their controls.

I've looked at dialog.prg where the initiate method does the resize16 work, but I wouldn't know where to start to fix it. If anybody has any ideas on this I would like to hear them.

Regards,
Charles
Charles Pratt
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Charles,

Could you provide us a small and self contained sample ? Thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
CharlesPratt
Posts: 38
Joined: Tue Jan 09, 2007 2:31 am
Location: Winston-Salem, NC

Post by CharlesPratt »

Antonio -
I sent an e-mail to you with a zip file (multfld.zip) attached that contained folder.prg (tfolder modified), tabctrl.c modified, foldonly.prg, and foldonly.rc. I wasn't sure how to upload it to this forum.

Regards,
Charles
Charles Pratt
CharlesPratt
Posts: 38
Joined: Tue Jan 09, 2007 2:31 am
Location: Winston-Salem, NC

Post by CharlesPratt »

We've still not been able to fix the problem of the controls not showing on the first tab of the multiline folders when RESIZE16 is used. Below is a web address to download a sample with the supporting files.

Problem is solved! See my post below for a sample.
Charles
Last edited by CharlesPratt on Thu May 10, 2007 1:12 pm, edited 3 times in total.
Charles Pratt
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

Charles,

the link gives an error 404-object not found
CharlesPratt
Posts: 38
Joined: Tue Jan 09, 2007 2:31 am
Location: Winston-Salem, NC

Post by CharlesPratt »

Sorry about that, Stefan. I just edited the link to show the correct file name.

Charles
Charles Pratt
CharlesPratt
Posts: 38
Joined: Tue Jan 09, 2007 2:31 am
Location: Winston-Salem, NC

Post by CharlesPratt »

To everybody who is following this thread -

I have solved the problem with a simple fix. The modified tabctrl.c is no longer needed, and only one line of code needs to be added to folder.prg. To have very nice multiline folders from resources:

1. Add TCS_MULTILINE to the Style in your RC file.
2. Add ::AdjustRect() to the Initiate() method of Tfolder
3. If you use the RESIZE16 Clause, you will need to say:
ON INIT oFld:AdjustRect() in your prg code.
A working example link is below:

www.softraksystems.com/download/MULTFOLD.ZIP

Best regards,
Charles
Charles Pratt
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Charles,

Excellent, and thanks for sharing the solution with us :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post by Ugo »

CharlesPratt wrote:To everybody who is following this thread -

I have solved the problem with a simple fix. The modified tabctrl.c is no longer needed, and only one line of code needs to be added to folder.prg. To have very nice multiline folders from resources:

1. Add TCS_MULTILINE to the Style in your RC file.
2. Add ::AdjustRect() to the Initiate() method of Tfolder
3. If you use the RESIZE16 Clause, you will need to say:
ON INIT oFld:AdjustRect() in your prg code.
A working example link is below:

www.softraksystems.com/download/MULTFOLD.ZIP
Charles,

can I test your news?
i compile and found an error at runtime:

Code: Select all

   Descrizione: Error BASE/1004  Message not found: TCLIPGET:TYPE

Stack Calls
===========
   Called from: tobject.prg => TCLIPGET:ERROR(172)
   Called from: tobject.prg => TCLIPGET:MSGNOTFOUND(205)
   Called from: tobject.prg => TCLIPGET:TYPE(0)
   Called from: tget.prg => TCLIPGET:PARSEPICT(367)
   Called from: tget.prg => TCLIPGET:SETPICTURE(2043)
   Called from: tget.prg => (b)GET:GET(122)
   Called from: TCLIPGET.prg => TCLIPGET:TCLIPGET(0)
   Called from: tget.prg => TCLIPGET:NEW(234)
   Called from: TCLIPGET.prg => GETNEW(23)
   Called from: TGET.prg => TGET:REDEFINE(361)
   Called from: FOLDONLY.PRG => SNGLFOLD(86)
   Called from: FOLDONLY.PRG => (b)BUILDMENU(34)
   Called from: MENU.prg => TMENU:COMMAND(407)
   Called from: WINDOW.prg => TWINDOW:COMMAND(937)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: WINDOW.prg => _FWH(3177)
   Called from:  => WINRUN(0)
   Called from: WINDOW.prg => TWINDOW:ACTIVATE(886)
   Called from: FOLDONLY.PRG => MAIN(24)
can you help me?
Ciao, best regards,
Ugo
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Ugo,

You can't use Harbour from CVS as Class TGet has been modified and now it does not work fine with FWH.

Please use Harbour from www.fivetechsoft.com/files/harbour.exe
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post by Ugo »

Antonio Linares wrote:You can't use Harbour from CVS as Class TGet has been modified and now it does not work fine with FWH.

Please use Harbour from www.fivetechsoft.com/files/harbour.exe
I use xHarbour, do not work with this?
Ciao, best regards,
Ugo
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Ugo,

Are you using the most recent xHarbour from the CVS ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post by Ugo »

Antonio Linares wrote:Are you using the most recent xHarbour from the CVS ?
Antonio,

i download from CVS today.
Ciao, best regards,
Ugo
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post by Ugo »

Antonio,
I do not receive the replies:

Code: Select all

Always notify me of replies:
Sends an e-mail when someone replies to a topic you have posted in. This can be changed whenever you post.
in my profile is set to YES!
Ciao, best regards,
Ugo
User avatar
Raymundo Islas M.
Posts: 590
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO

Post by Raymundo Islas M. »

Antonio :

Can you tell me how to apply these changes into my apps ??

Thanks a lot


Saludos
FWH 10.6 + xHarbour + Borland 582
Post Reply