ukoenig wrote:Christobal,
great job
thank You very much
It seems there is something missing in class TGRAPH
I had a look at it, but couldn't find it.
//oGraph:SetArrayFonts( { oFont2, oFont, oFont1, oFont, oFontB, oFontE, oFont1, oFont1, oFontB } )
I disabled this line and it works perfect without problems.
Application
===========
Path and name: I:\___PANEL4\PANEL.exe (32 bits)
Size: 4,060,160 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20181011)
FiveWin version: FWH 19.05
C compiler version: Borland/Embarcadero C++ 7.3 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 06/04/19, 15:55:02
Error description: Warning BASE/1004 Message not found: TGRAPH:SETARRAYFONTS
regards
Uwe
have you seen that there is also a TAB nnavigation.
We should have TAB to select different panels and then inside the panels we need to open and close icon bars.
#include "FiveWin.ch"
STATIC oDlg, c_path, aValues
Static oPanel1, oPanel2, oTabs
Static aCtrls1, aCtrls2
Static oFont, oBold
FUNCTION MAIN()
LOCAL oFont1, oFontG
LOCAL oPanelScroll
LOCAL oSay, oResize[8]
LOCAL oGet, nTabPos := 1
LOCAL cFind := SPACE( 50 ), lDrag := .F.
LOCAL nWidth := 850, nHeight := 500
LOCAL nRowPos, nColPos, oBtnClose, oBtnMax, oBtnMin, oBtnDlg
aCtrls1 := {}
aCtrls2 := {}
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-14
DEFINE FONT oBold NAME "Segoe UI" SIZE 0,-14 BOLD
DEFINE FONT oFont1 NAME "Segoe UI Light" SIZE 0,-22
DEFINE FONT oFontG NAME "Segoe UI" SIZE 0,-18
c_path := cFilePath(GetModuleFileName( GetInstance() ) )
aValues := READ_INI1(c_path)
DEFINE DIALOG oDlg SIZE 850, 580 PIXEL TRUEPIXEL ;
STYLE nOr( WS_POPUP ) COLOR aValues[2], aValues[1] // 14606046
@ 2, oDlg:nWidth - 48 BTNBMP oBtnClose BITMAP c_path + "closew.png" ;
FLAT NOBORDER NOROUND ;
ACTION oDlg:End() SIZE 45, 24 ;
COLOR CLR_BLACK, aValues[1]
oBtnClose:cToolTip = { "Close" + CRLF + "dialog","SYSTEM", 1, CLR_BLACK, 14089979 }
// on change must clear the panel !
// ---------------------------------------
@ 100, 0 TABS oTabs PROMPTS "&One", "&Two" OF oDlg PIXEL ;
BITMAPS c_path + "people.bmp", c_path + "open2.bmp" ;
ACTION ( Paint_Panel( oPanelScroll ), oPanelScroll:Refresh() )
oDlg:oTop = oTabs
// starts with 1 button-line on tab 1
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT( oPanelScroll := CreatePanel( oDlg ),;
Paint_Panel( oPanelScroll ), ;
oPanelScroll:SetRange(),;
oPanelScroll:CheckResize() )
RELEASE FONT oFont1, oFontG
RELEASE FONT oFont, oBold
RETURN NIL
//--------------- Create the panel only once ----------
FUNCTION CREATEPANEL( oDlg )
LOCAL aGrad := { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }
// New( nTop, nLeft, nBottom, nRight, oWnd, lDesign, cVarName, lBorder )
oPanel1 := TScrollPanel():New( 120, 010, 350, 810, oDlg, .t. )
oPanel1:nRightMargin := 20
oPanel1:nBottomMargin := 20
oPanel1:WinStyle(WS_BORDER, .f.)
oPanel1:setcolor( aValues[4], aValues[3] ) // 14606046, 14606046)
RETURN oPanel1
// ----------------------- Fill the panel with tab 2 ----------
STATIC FUNCTION PAINT_PANEL( oPanel )
LOCAL x
LOCAL oBtn
LOCAL nRow := 10
LOCAL nCol := 10
LOCAL nClrText := aValues[6]
LOCAL nClrBack := aValues[3]
LOCAL nClrBorder := aValues[7]
LOCAL nBtnColor := aValues[5]
LOCAL aBtns
LOCAL lSw := .T.
AEval( oPanel:aControls, { | o | o:Hide() } )
DO CASE
CASE oTabs:nOption = 1
aBtns := { ;
{ "System" + CRLF + "Screen, notifications," + CRLF + "power", 0xE770, { || BTN_ACTION(oDlg) } }, ;
{ "Devices" + CRLF + "Bluetooth, printers," + CRLF + "mouse", 0xE772, { || BTN_ACTION(oDlg) } }, ;
{ "Mobile" + CRLF + "Link your Android, iPhone" + CRLF, 0xE1C9, { || BTN_ACTION(oDlg) } }, ;
{ "Network && Internet" + CRLF + "WIFI, flight mode" + CRLF + "VPN", 0xE12b, { || BTN_ACTION(oDlg) } }, ;
{ "Personalization" + CRLF + "Background, lock screen" + CRLF, 0xE771, { || BTN_ACTION(oDlg) } }, ;
{ "Apps" + CRLF + "Uninstall defaults" + CRLF + "Optional Features", 0xE179, { || BTN_ACTION(oDlg) } }, ;
{ "Account" + CRLF + "Your account, email sync" + CRLF + "Work family", 0xE77B, { || BTN_ACTION(oDlg) } }, ;
{ "Time and language" + CRLF + "Voice, region, date" + CRLF, 0xE775, { || BTN_ACTION(oDlg) } }, ;
{ "Games" + CRLF + "Game bar, DVR," + CRLF + "retransmission and game mode", 0xE909, { || BTN_ACTION(oDlg) } }, ;
{ "Accessibility" + CRLF + "Narrator, magnifying glass," + CRLF + "high contrast", 0xE776, { || BTN_ACTION(oDlg) } }, ;
{ "Cortana" + CRLF + "Language of Cortana," + CRLF + "permissions, notifications", 0xECCA, { || BTN_ACTION(oDlg) } }, ;
{ "Privacy" + CRLF + "Location Camera" + CRLF, 0xE1F6, { || BTN_ACTION(oDlg) } }, ;
{ "Update && Security" + CRLF + "Windows Update" + CRLF + "Recovery", 0xE777, { || BTN_ACTION(oDlg) } } ;
}
if Len( aCtrls1 ) > 0
lSw := .F.
AEVal( aCtrls1, { | o | o:Show() } )
endif
CASE oTabs:nOption = 2
aBtns := { ;
{ "System" + CRLF + "Screen, notifications," + CRLF + "power", 0xE770, { || BTN_ACTION(oDlg) } }, ;
{ "Devices" + CRLF + "Bluetooth, printers," + CRLF + "mouse", 0xE772, { || BTN_ACTION(oDlg) } }, ;
{ "Mobile" + CRLF + "Link your Android, iPhone" + CRLF, 0xE1C9, { || BTN_ACTION(oDlg) } }, ;
{ "Network && Internet" + CRLF + "WIFI, flight mode" + CRLF + "VPN", 0xE12b, { || BTN_ACTION(oDlg) } }, ;
{ "Update && Security" + CRLF + "Windows Update" + CRLF + "Recovery", 0xE777, { || BTN_ACTION(oDlg) } } ;
}
if Len( aCtrls2 ) > 0
lSw := .F.
AEVal( aCtrls2, { | o | o:Show() } )
endif
ENDCASE
if lSw
FOR x = 1 to Len( aBtns )
IF x > 1
IF Mod( x, 5 ) = 1
nRow += 140
nCol := 10
ELSE
nCol += 200
ENDIF
ENDIF
@ nRow, nCol BTNBMP oBtn PROMPT aBtns[ x ][ 1 ] ;
RESOURCE aBtns[ x ][ 2 ] SIZE 190, 140 PIXEL OF oPanel FLAT NOBORDER ;
COLOR nClrText, nClrBack
WITH OBJECT oBtn
:bAction := aBtns[ x ][ 3 ]
:nClrBorder := nClrBorder
:bColorMap := { | o | o:lBorder := o:lMOver, nBtnColor }
:oFontBold := oBold
:lRound := .F.
END
if oTabs:nOption = 1
AAdd( aCtrls1, oBtn )
endif
if oTabs:nOption = 2
AAdd( aCtrls1, oBtn )
endif
NEXT x
endif
RETURN NIL
//----------------------------------------------------------------------------//
STATIC FUNCTION BTN_ACTION( oDlg )
//MsgAlert( "Action of button : " + cButton, "Selected button" )
MsgAlert( "Action of button : ", "Selected button" )
RETURN NIL
//----------------------------------------------------------------------------//
STATIC FUNCTION DUMMY()
MsgAlert( "Action from GET", "Attention" )
RETURN NIL
//----------------------------------------------------------------------------//
// --------- INI - Read -------------
FUNCTION READ_INI1(c_path)
LOCAL cIniFile := c_path + "SETTINGS1.INI", aVal[10]
aVal[01] := Val(GetPvProfString("Colors", "Dialog", "13816530", cIniFile ) )
aVal[02] := Val(GetPvProfString("Colors", "DText", "0", cIniFile ) )
aVal[03] := Val(GetPvProfString("Colors", "Panel", "14935011", cIniFile ) )
aVal[04] := Val(GetPvProfString("Colors", "PText", "0", cIniFile ) )
aVal[05] := Val(GetPvProfString("Colors", "Button", "8421376", cIniFile ) )
aVal[06] := Val(GetPvProfString("Colors", "BText", "255", cIniFile ) )
aVal[07] := Val(GetPvProfString("Colors", "Focus", "0", cIniFile ) )
aVal[08] := Val(GetPvProfString("Colors", "Dialog 2", "16763283", cIniFile ) )
aVal[09] := IIF(GetPvProfString("Colors", "Border", ".T.", cIniFile ) == ".T." , .T. , .F. )
aVal[10] := IIF(GetPvProfString("Dialog", "Resize", ".T.", cIniFile ) == ".T." , .T. , .F. )
RETURN aVal
//----------------------------------------------------------------------------//
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 55 guests