Page 1 of 3

Multiline Folders

Posted: Tue May 01, 2007 7:29 pm
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

Posted: Wed May 02, 2007 7:12 am
by Antonio Linares
Charles,

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

Posted: Thu May 03, 2007 4:47 pm
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

Posted: Tue May 08, 2007 12:38 pm
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

Posted: Wed May 09, 2007 7:44 am
by StefanHaupt
Charles,

the link gives an error 404-object not found

Posted: Wed May 09, 2007 12:58 pm
by CharlesPratt
Sorry about that, Stefan. I just edited the link to show the correct file name.

Charles

Posted: Thu May 10, 2007 1:27 pm
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

Posted: Thu May 10, 2007 1:43 pm
by Antonio Linares
Charles,

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

Posted: Fri May 11, 2007 1:53 pm
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?

Posted: Fri May 11, 2007 4:02 pm
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

Posted: Fri May 11, 2007 4:40 pm
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?

Posted: Fri May 11, 2007 5:04 pm
by Antonio Linares
Ugo,

Are you using the most recent xHarbour from the CVS ?

Posted: Fri May 11, 2007 5:37 pm
by Ugo
Antonio Linares wrote:Are you using the most recent xHarbour from the CVS ?
Antonio,

i download from CVS today.

Posted: Fri May 11, 2007 5:41 pm
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!

Posted: Tue May 15, 2007 12:50 am
by Raymundo Islas M.
Antonio :

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

Thanks a lot


Saludos