Tabs from resource

User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Tabs from resource

Post by Rick Lipkin »

To All

Please forgive me is this question has been asked before .. I have a dialog that I want to put multiple tabs in and within those tabs I want a listbox and 3 buttons ..

I have never used tabs .. looked in the examples and in the limited time .. could not find anything close ...

Any help would be appreciated ..

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

Post by Antonio Linares »

Rick,

Do you mean tabs or folders ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
FWHISHOW
Posts: 80
Joined: Thu Nov 29, 2007 2:01 pm

Post by FWHISHOW »

DEFINE WINDOW oWndChild OF ownd MDICHILD TITLE "Touch"

@ 8, 0 TABS oTabs PROMPTS " Alimentar Mesas "," Outras Opções " OF oWndChild ;
ACTION ( aDlgs[ nDlg ]:Hide(), nDlg := nOption,;
aDlgs[ nOption ]:Show(), aDlgs[ nOption ]:SetFocus() ) color CLR_BLACK

oWndChild:oBottom = oTabs
oWndChild:Resize()
*************************************
* 1 dlg
*

DEFINE DIALOG oDlg1 RESOURCE if(pVideo1>800,"TOUCHTELA1","TOUCHTELAA800") OF oWndChild

redefine get oprod var vprod of oDlg1 id 4013 PICTURE "9999999999999"

redefine listBox tcobRW1 Fields OF oDlg1 id 4012 COLORS

tcobRW1:lAdjBrowse := .f.
tcobRW1:lAdjLastCol := .t.
tcobRW1:aHJustify := {2,0,1}
tcobRW1:aJustify := {2,0,1}
tcobRW1:nHeaderStyle := 3
tcobRW1:nLineStyle := 2
tcobRW1:nclrbackfocus:= {|| CLR_HBLUE}
tcobRW1:nClrNFBack := {|| CLR_HBBLUE}
tcobRW1:nHeaderHeight:= 19
tcobRW1:nLineHeight := 18
tcobRW1:nFreeze := 3
tcobRW1:aHeaders := {"Cód.","Descrição","Qtde"}
tcobRW1:nClrPane := {|| IF(tcobRW1:nat % 2 == 0,CLR_LGRAY,CLR_LGREEN)}
tcobRW1:bLine := {|| If( Len(aProdtch)<1 .or. tcobRW1:nAt>Len(aProdtch),array(3),;
{ trans(aProdtch[tcobRW1:nat,1],'999999'),;
trans(aProdtch[tcobRW1:nat,2],'@!'),;
trans(aProdtch[tcobRW1:nat,4],'9999.999')})}
tcobRW1:setArray(aProdtch)
tcobRW1:Refresh()

***sub-grupos

redefine listBox obRW2 Fields OF oDlg1 id 4016 COLORS CLR_BLACK,CLR_LGREEN SIZES 100

obRW2:lDrawHeaders := .F.
obRW2:lAdjBrowse := .f.
obRW2:lAdjLastCol := .t.
obRW2:aJustify := {2}
obRW2:nHeaderStyle := 3
obRW2:nLineStyle := 2
obRW2:nclrbackfocus:= {|| CLR_HBLUE}
obRW2:nClrNFBack := {|| CLR_HBBLUE}
obRW2:nLineHeight := if(pVideo1>800,52,46)
obRW2:setArray(subgrupos)
obRW2:Refresh()



****imagens


REDEFINE image ToBti[1] ID 4053 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,1,aprodsubs)) CURSOR ocurfot
REDEFINE image ToBti[2] ID 4054 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,2,aprodsubs)) CURSOR ocurfot
REDEFINE image ToBti[3] ID 4055 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,3,aprodsubs)) CURSOR ocurfot
REDEFINE image ToBti[4] ID 4056 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,4,aprodsubs)) CURSOR ocurfot


REDEFINE BUTTONBMP tchbtn[1] ID 4010 OF oDlg1 ACTION(okenter()) CANCEL
REDEFINE BUTTONBMP tchbtn[2] ID 4019 OF oDlg1 ACTION(calculatch(0)) CANCEL
REDEFINE BUTTONBMP tchbtn[3] ID 4011 OF oDlg1 ACTION(tchclr()) CANCEL
REDEFINE BUTTONBMP tchbtn[4] ID 4007 OF oDlg1 ACTION(calculatch(1)) CANCEL
REDEFINE BUTTONBMP tchbtn[5] ID 4008 OF oDlg1 ACTION(calculatch(2)) CANCEL
REDEFINE BUTTONBMP tchbtn[6] ID 4009 OF oDlg1 ACTION(calculatch(3)) CANCEL
REDEFINE BUTTONBMP tchbtn[7] ID 4004 OF oDlg1 ACTION(calculatch(4)) CANCEL
REDEFINE BUTTONBMP tchbtn[8] ID 4005 OF oDlg1 ACTION(calculatch(5)) CANCEL
REDEFINE BUTTONBMP tchbtn[9] ID 4006 OF oDlg1 ACTION(calculatch(6)) CANCEL
REDEFINE BUTTONBMP tchbtn[10] ID 4001 OF oDlg1 ACTION(calculatch(7)) CANCEL
REDEFINE BUTTONBMP tchbtn[11] ID 4002 OF oDlg1 ACTION(calculatch(8)) CANCEL
REDEFINE BUTTONBMP tchbtn[12] ID 4003 OF oDlg1 ACTION(calculatch(9)) CANCEL


REDEFINE group tchbtn[17] PROMPT "Produtos - Página: 1 de 1" ID 5555 OF oDlg1 transparent


REDEFINE BUTTONBMP tchbtn[13] ID 4020 OF oDlg1 BITMAP "DOWN" ACTION(obRW2:godown(),obRW2:setfocus()) CANCEL
REDEFINE BUTTONBMP tchbtn[14] ID 4021 OF oDlg1 BITMAP "UP" ACTION(obRW2:goup(),obRW2:setfocus()) CANCEL
REDEFINE BUTTONBMP tchbtn[15] ID 4018 OF oDlg1 BITMAP "REGVOLTA" ACTION(mudapagina(@nPG,nTo,.f.,aprodsubs,tchbtn,tipo)) CANCEL
REDEFINE BUTTONBMP tchbtn[16] ID 4022 OF oDlg1 BITMAP "REGAVANCA" ACTION(mudapagina(@nPG,nTo,.t.,aprodsubs,tchbtn,tipo)) CANCEL
REDEFINE BUTTONBMP tchbtn[18] ID 4084 OF oDlg1 BITMAP "QUIT" ACTION(oDlg1:END()) CANCEL TEXTTOP
REDEFINE BUTTONBMP tchbtn[19] ID 4085 OF oDlg1 BITMAP "MAME" ACTION(TECLADOTOUCH(fonte_TCH,@aProdtch)) CANCEL
REDEFINE BUTTONBMP tchbtn[20] ID 4086 OF oDlg1 BITMAP "DOWN" ACTION(tcobRW1:godown(),tcobRW1:setfocus()) CANCEL

ACTIVATE DIALOG oDlg1 NOWAIT ON INIT (oDlg1:Move( 0, 0 ));
VALID( IF(oWndChild#NIL,oWndChild:END(),),.T.)

**********************
* dlg 2

DEFINE DIALOG oDlg2 RESOURCE "TOUCHTELA" OF oWndChild

redefine listBox pfaobRW Fields OF oDlg2 id 511 SIZES 45,100,400,80,80,80,70,20,80 COLORS CLR_BLACK,CLR_LGREEN

pFaobRW:lAdjBrowse := .t.
pFaobRW:lAdjLastCol := .t.
pFaobRW:aHJustify := {2,2,0,1,1,1,2,2,1}
pFaobRW:aJustify := {2,2,0,1,1,1,2,2,1}
pFaobRW:nHeaderStyle := 3
pFaobRW:nLineStyle := 2
pFaobRW:nclrbackfocus:= {|| CLR_HBLUE}
pFaobRW:nClrNFBack := {|| CLR_HBBLUE}
pFaobRW:nHeaderHeight:= if(pVideo1>800,33,31)
pFaobRW:nLineHeight := 36
pFaobRW:setArray(aProdtch)
pFaobRW:Refresh()

**

REDEFINE BUTTONBMP obtc[1] ID 4017 OF oDlg2 BITMAP "USER"

ACTIVATE DIALOG oDlg2 NOWAIT ON INIT (oDlg2:Move( 0, 0 ));
VALID(IF(oWndChild#NIL,.F.,.T.))


oDlg2:Hide()
oDlg1:SetFocus()
aDlgs:={ oDlg1, oDlg2 }

ACTIVATE WINDOW oWndChild maximized valid( oWndChild:=NIL,oTabs:end(),ocurfot:end(),fonte_TC5:end(),fonte_TC2:end(),fonte_TCH:END())



Espero ter ajudado!
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Post by Rick Lipkin »

Antonio

It looks like testfld2.prg will get me started .. thanks

Rick
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Post by Rick Lipkin »

Antonio

Why is ( custom ) control ( folder32 ) 110 generating an error :

//---- error
Application
===========
Path and name: C:\FOX\VEHSQL\Veh32.Exe (32 bits)
Size: 2,200,576 bytes
Time from start: 0 hours 0 mins 14 secs
Error occurred at: 01/15/2008, 10:25:38
Error description: Error FiveWin/3 Cannot create Dialog Box:
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResource: WORKORD

Stack Calls
===========
Called from: => CREATEDLGERROR(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: WORKVIEW.PRG => _WORKVIEW(477)
Called from: => _DOIT(91)
Called from: WOMENU.PRG => (b)_WOMENU(22)
Called from: BUTTON.PRG => TBUTTON:CLICK(0)
Called from: CONTROL.PRG => TBUTTON:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => SENDMESSAGE(0)
Called from: DIALOG.PRG => TDIALOG:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0)
Called from: DIALOG.PRG => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: WOMENU.PRG => _WOMENU(28)
Called from: MANTMENU.PRG => (b)_MANTMENU(29)
Called from: BUTTON.PRG => TBUTTON:CLICK(0)
Called from: CONTROL.PRG => TBUTTON:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => SENDMESSAGE(0)
Called from: DIALOG.PRG => TDIALOG:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0)
Called from: DIALOG.PRG => TDIALOG:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: MAIN.PRG => MAIN(354)

//--- rc file

WORKORD DIALOG 22, 9, 407, 277
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_THICKFRAME
FONT 8, "MS Sans Serif"
{
EDITTEXT 125, 6, 18, 29, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 120, 38, 18, 36, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 117, 79, 18, 49, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 118, 132, 18, 51, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 119, 204, 18, 27, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 121, 235, 18, 42, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 132, 281, 18, 49, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 122, 235, 41, 95, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 131, 235, 55, 48, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 145, 235, 81, 48, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 135, 235, 95, 48, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 123, 79, 41, 49, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 126, 132, 41, 28, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 129, 79, 55, 49, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 130, 132, 55, 28, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 124, 79, 68, 81, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 133, 79, 81, 81, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 134, 34, 95, 126, 12, WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Add Parts", 114, 6, 123, 50, 14
PUSHBUTTON "&Add Labor", 137, 7, 187, 50, 14
LTEXT "Serial#", -1, 177, 41, 53, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
PUSHBUTTON "&Edit Parts", 115, 6, 137, 50, 14
PUSHBUTTON "&Delete Parts", 116, 6, 151, 50, 15
EDITTEXT 128, 349, 18, 45, 12, WS_BORDER | WS_TABSTOP
CONTROL "", 110, "FOLDER32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 63, 118, 331, 122
PUSHBUTTON "&Quit", 112, 356, 33, 40, 22
PUSHBUTTON "&Print", 127, 356, 70, 40, 13
PUSHBUTTON "&Edit Labor", 138, 7, 201, 50, 14
PUSHBUTTON "&Delete Labor", 139, 7, 215, 50, 14
EDITTEXT 140, 63, 248, 38, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 141, 135, 248, 36, 12, WS_BORDER | WS_TABSTOP
LTEXT "Total", -1, 325, 248, 27, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
EDITTEXT 142, 354, 248, 43, 12, WS_BORDER | WS_TABSTOP
PUSHBUTTON "C&lose", 143, 356, 83, 40, 13
PUSHBUTTON "&Reopen", 144, 356, 96, 40, 13
PUSHBUTTON "&Void WO", 146, 312, 96, 40, 13
EDITTEXT 147, 207, 248, 37, 12, WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Outside", 148, 312, 57, 40, 13
PUSHBUTTON "&Tires", 149, 312, 70, 40, 13
EDITTEXT 150, 280, 248, 38, 12, WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Memo", 151, 312, 83, 40, 13
EDITTEXT 152, 235, 68, 48, 12, WS_BORDER | WS_TABSTOP
LTEXT "Odometer IN", -1, 177, 55, 53, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Odometer OUT", -1, 177, 68, 53, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Program Area", -1, 177, 81, 53, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Technician", -1, 177, 95, 53, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Date / Time IN", -1, 7, 41, 66, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Date / Time OUT", -1, 7, 55, 66, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Contact Person", -1, 7, 68, 66, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Contact Phone", -1, 7, 81, 66, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Re:", -1, 7, 95, 22, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Shop ID", -1, 6, 4, 29, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "License Make Model Year Vnumb EqpTp ", -1, 39, 4, 291, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Parts Total", -1, 7, 248, 49, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Tires", -1, 251, 248, 27, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Outside", -1, 178, 248, 27, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
LTEXT "Labor", -1, 106, 248, 27, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
PUSHBUTTON "&Edit", 153, 356, 57, 40, 13
LTEXT "Work Order", -1, 349, 4, 45, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
}
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Rick,

FOLDER32 is a define not a string (should not be between "").

Better simply write it as "SysTabControl32"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Post by Rick Lipkin »

Antonio

Been a crazy day here .. phone going nuts .. all kinds of problems so I haven't had too much time to concentrate ..

I did see the include statement in the .rc and after bludgening myself silly .. I opened Winapi.ch and found the translation you mentioned ..

I was able to insert it into my .rc and I think I have what I need to make my idea work ..

Thanks so much !!

Rick Lipkin
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Folders

Post by TimStone »

Rick,

I use folders without any problems. If you need immediate responses feel free to email me at timstone at masterlinksoftware dot com or MLSDG on AIM. I'd be glad to help and I'm at the computer all day today.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Post by Rick Lipkin »

Tim

Thank you for your gracious reply .. I think I have got this thing working the way I want ..

I have multiple tables with listboxes open and instead of navigating away from the main form ( with buttons ) .. I wanted to 'tab' thru them individually.

Actually made for quite a clean(er) dialog box and using SQL recordsets cached locally .. it is very 'smooth'

Rick Lipkin
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Folders

Post by TimStone »

Been there, done that ... but with independent dialogs on each folder. Its just cleaner in the .rc file.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

We sale a new class TTabs Office like 2007 Style with Bitmaps
If you want you can write on private.
Best Regards, Saludos

Falconi Silvio
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Class

Post by TimStone »

How about Folders ?

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

No only TTabs now ... We are working on Folder style 2007

If you want We have only folder with bitmaps NO style office 2007 only xp style!!
Best Regards, Saludos

Falconi Silvio
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Thanks

Post by TimStone »

I'm fine with standard FWH ... I don't need bitmaps on folders at this time.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

standard FWH supports bitmaps on folders already

fwh\samples\TestFold.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply