oWnd:oClient := oPanel
oWnd:oClient := oPanel
Hello,
is it possible to have oWnd:oClient := oPanel in combination with
oPanel:nTop := 20
Thank you in advance
Otto
is it possible to have oWnd:oClient := oPanel in combination with
oPanel:nTop := 20
Thank you in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: oWnd:oClient := oPanel
I not understood can make a test sample ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: oWnd:oClient := oPanel
Hello Silvio,
In the meantime I found a solution.
But there is another problem. It seems we can't make resizeable windows without a border.
Thank you and best regards
Otto
oWnd:bPainted = { || oPanel:nTop := 30 }
In the meantime I found a solution.
But there is another problem. It seems we can't make resizeable windows without a border.
Thank you and best regards
Otto
oWnd:bPainted = { || oPanel:nTop := 30 }
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
Re: oWnd:oClient := oPanel
Otto,
http://forums.fivetechsupport.com/viewt ... 95#p221895
regards
Uwe
it is possibleBut there is another problem. It seems we can't make resizeable windows without a border.
http://forums.fivetechsupport.com/viewt ... 95#p221895
regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
Re: oWnd:oClient := oPanel
Hallo Uwe,
danke.
Das funkioniert leider nicht.
Das Fenster ist rahmenlos aber die Größe kann nicht verändert werden.
Liebe Grüße
Otto
danke.
Das funkioniert leider nicht.
Das Fenster ist rahmenlos aber die Größe kann nicht verändert werden.
Liebe Grüße
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: oWnd:oClient := oPanel
Otto wrote:Hello Silvio,
In the meantime I found a solution.
But there is another problem. It seems we can't make resizeable windows without a border.
Thank you and best regards
Otto
oWnd:bPainted = { || oPanel:nTop := 30 }
Now I understand sorry
What you use to make the window ..window or dialog ?
I thinkyou must use a dialog command with RESIZABLE then you can make a bresized codeblock where you can set the panel ( are you using tpanelscroll ?)
I made a type of that you want make ( only I insert two xbrowse) but the system is the same
I used
DEFINE DIALOG oDlgTariffe SIZE 880,600 ;
PIXEL TRUEPIXEL RESIZABLE FONT oFont
oDlgTariffe:aMinMaxInfo := { nil, nil, nil, nil, 878, 570, nil, nil } //878, 570
oDlgTariffe:bResized := <||
local oRect := oDlgTariffe:GetCliRect()
local x:= oBrw1:nBottom
oBtnCheck:nLeft := oRect:nRight - 395
oBtnCheck:nTop := oRect:nBottom - 50
oBtnPrint:nLeft := oRect:nRight - 220
oBtnPrint:nTop := oRect:nBottom - 50
oBtnClose:nLeft := oRect:nRight - 120
oBtnClose:nTop := oRect:nBottom - 50
RETURN nil
>
ACTIVATE DIALOG oDlgTariffe CENTERED
you can on oDlgTariffe:bResized insert the refresh of Panel you wish
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: oWnd:oClient := oPanel
Hello Silvio,
I tried your code but with your code the DIALOG has a frame.
If I add WS_POPUP style I have no Frame but can't resize the DIALOG.
DEFINE DIALOG oDlg SIZE 880,600 ;
PIXEL TRUEPIXEL RESIZABLE //FONT oFont
// STYLE WS_POPUP
Best regards
Otto
I tried your code but with your code the DIALOG has a frame.
If I add WS_POPUP style I have no Frame but can't resize the DIALOG.
DEFINE DIALOG oDlg SIZE 880,600 ;
PIXEL TRUEPIXEL RESIZABLE //FONT oFont
// STYLE WS_POPUP
Best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: oWnd:oClient := oPanel
wich is FRAME ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: oWnd:oClient := oPanel
Hello Silvio,
regards
Otto
regards
Otto
Code: Select all
#include "FiveWin.ch"
static oDlg
//----------------------------------------------------------------------------//
function Main()
DEFINE DIALOG oDlg SIZE 880,600 ;
PIXEL TRUEPIXEL RESIZABLE //FONT oFont
// STYLE WS_POPUP
/*
oDlg:aMinMaxInfo := { nil, nil, nil, nil, 878, 570, nil, nil } //878, 570
oDlg:bResized := <||
local oRect := oDlg:GetCliRect()
local x:= oBrw1:nBottom
oBtnCheck:nLeft := oRect:nRight - 395
oBtnCheck:nTop := oRect:nBottom - 50
oBtnPrint:nLeft := oRect:nRight - 220
oBtnPrint:nTop := oRect:nBottom - 50
oBtnClose:nLeft := oRect:nRight - 120
oBtnClose:nTop := oRect:nBottom - 50
RETURN nil
>
*/
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: oWnd:oClient := oPanel
Otto,
test made in 5 minutes
Code
test made in 5 minutes
Code
Code: Select all
#include "FiveWin.ch"
static oDlg
//----------------------------------------------------------------------------//
function Main()
Local oPanelScroll
Local oFont1,oFontG
Local oSay
Local oGet
local cFind := ""
local cPrompt := "Setup of Windows ( FWH BtnBmp Demo )"
DEFINE FONT oFont1 NAME "Segoe UI Light" SIZE 0,-24
DEFINE FONT oFontG NAME "Segoe UI" SIZE 0,-18
DEFINE DIALOG oDlg SIZE 880,600 ;
PIXEL TRUEPIXEL RESIZABLE //FONT oFont
@ 20, 160 SAY oSay PROMPT cPrompt OF oDlg PIXEL FONT oFont1 SIZE 420, 40
@ 70, 170 GET oGet VAR cFind OF oDlg PIXEL FONT oFontG SIZE 400, 36
* CUEBANNER "Find a setting"
oDlg:bResized := <||
local oRect := oDlg:GetCliRect()
oSay:nLeft := oRect:nLeft +160
oSay:nTop := oRect:ntop + 30
oGet:nLeft := oRect:nLeft +170
oGet:nTop := oRect:nTop + 70
RETURN nil
>
*/
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT( oPanelScroll := CreatePanel( oDlg,oGet ),;
oPanelScroll:CheckResize(),;
eval(oDlg:bResized) )
return nil
//----------------------------------------------------------------------------//
function CreatePanel( oDlg,oGet )
local oPanel
local oBold
local aGrad := { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }
local aBtns := { ;
{ "System" + CRLF + "Screen, notifications," + CRLF + "power", 0xE770, { || Dummy() } }, ;
{ "Devices" + CRLF + "Bluetooth, printers," + CRLF + "mouse", 0xE772, { || Dummy() } }, ;
{ "Mobile" + CRLF + "Link your Android, iPhone" + CRLF, 0xE1C9, { || Dummy() } }, ;
{ "Network && Internet" + CRLF + "WIFI, flight mode" + CRLF + "VPN", 0xE12b, { || Dummy() } }, ;
{ "Personalization" + CRLF + "Background, lock screen" + CRLF, 0xE771, { || Dummy() } }, ;
{ "Apps" + CRLF + "Uninstall defaults" + CRLF + "Optional Features", 0xE179, { || Dummy() } }, ;
{ "Account" + CRLF + "Your account, email sync" + CRLF + "Work family", 0xE77B, { || Dummy() } }, ;
{ "Time and language" + CRLF + "Voice, region, date" + CRLF, 0xE775, { || Dummy() } }, ;
{ "Games" + CRLF + "Game bar, DVR," + CRLF + "retransmission and game mode", 0xE909, { || Dummy() } }, ;
{ "Accessibility" + CRLF + "Narrator, magnifying glass," + CRLF + "high contrast", 0xE776, { || Dummy() } }, ;
{ "Cortana" + CRLF + "Language of Cortana," + CRLF + "permissions, notifications", 0xECCA, { || Dummy() } }, ;
{ "Privacy" + CRLF + "Location Camera" + CRLF, 0xE1F6, { || Dummy() } }, ;
{ "Update && Security" + CRLF + "Windows Update" + CRLF + "Recovery", 0xE777, { || Dummy() } } ;
}
local nRow := 10
local nCol := 10
local nClrBack := CLR_WHITE
local nW := 200
local nH := 140
local nCBorder := 0xC38B2B
local nClrText := CLR_BLACK
local nClrBorder := 0xE6E6E6
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-14
DEFINE FONT oBold NAME "Segoe UI" SIZE 0,-14 BOLD
WITH OBJECT oGet
:bAction := { || Dummy() }
:cBmpName := 0xE11A
:lBtnTransparent := .t.
:CreateButton()
END
oPanel := TScrollPanel():New( 135,010,180,550,oDlg, .t. )
oPanel:nRightMargin := 2
oPanel:nBottomMargin := 5
oPanel:WinStyle(WS_BORDER, .f.)
oPanel:setcolor(CLR_WHITE,CLR_WHITE)
For x = 1 to Len( aBtns )
if x > 1
if Mod( x, 5 ) = 1
nRow += 200
nCol := 10
else
nCol += 200
endif
endif
@ nRow, nCol BTNBMP oBtn PROMPT aBtns[ x ][ 1 ] ;
RESOURCE aBtns[ x ][ 2 ] SIZE nW, nH PIXEL OF oPanel FLAT NOBORDER ;
COLOR nClrText, nClrBack
WITH OBJECT oBtn
:bAction := aBtns[ x ][ 3 ]
:nClrBorder := nClrBorder
:bColorMap := { | o | o:lBorder := o:lMOver, nCBorder }
:oFontBold := oBold
:lRound := .F.
END
Next x
oPanel:SetRange()
RELEASE FONT oFont, oBold
return oPanel
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
static function Dummy()
Return nil
//----------------------------------------------------------------------------//
static function WndResize( oWnd )
local oRect := oWnd:GetCliRect()
local nMargin, nRow, nCol, nCols, nBtnWidth, nBtns, nBtn, oBtn, n
for n := 1 to 2
oWnd:aControls[ n ]:nLeft := ( oRect:nWidth - oWnd:aControls[ n ]:nWidth ) / 2
next
nBtnWidth := 200
nCols := Min( 5, Int( oRect:nWidth / nBtnWidth ) - 1 )
nMargin := ( oRect:nWidth - nCols * nBtnWidth ) / 2
nBtns := Len( oWnd:aControls ) - 2
nRow := 170
nCol := nMargin
if nCols > 2
for nBtn := 1 to nBtns
WITH OBJECT ( oBtn := oWnd:aControls[ nBtn + 2 ] )
:cCaption := Trim( oBtn:cCaption )
:nTop := nRow
:nLeft := nCol
:nWidth := 200
:nHeight := 140
:nLayOut := LAYOUT_TOP
END
if nBtn % nCols == 0
nRow += 200
nCol := nMargin
else
nCol += nBtnWidth
endif
next
else
for nBtn := 1 to nBtns
WITH OBJECT ( oBtn := oWnd:aControls[ nBtn + 2 ] )
:cCaption += " "
:nTop := nRow
:nLeft := 30
:nWidth := oRect:nWidth - 60
:nHeight := 80
:nLayOut := LAYOUT_LEFT
END
nRow += 100
next
endif
return nil
//----------------------------------------------------------------------------//
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: oWnd:oClient := oPanel
New release
Code: Select all
#include "FiveWin.ch"
static oDlg
//----------------------------------------------------------------------------//
function Main()
Local oPanelScroll
Local oFont1,oFontG
Local oSay
Local oGet
local cFind := ""
local cPrompt := "Setup of Windows ( FWH BtnBmp Demo )"
DEFINE FONT oFont1 NAME "Segoe UI Light" SIZE 0,-24
DEFINE FONT oFontG NAME "Segoe UI" SIZE 0,-18
DEFINE DIALOG oDlg SIZE 880,600 ;
PIXEL TRUEPIXEL RESIZABLE //FONT oFont
oDlg:setcolor(CLR_BLACK,CLR_WHITE)
@ 20, 160 SAY oSay PROMPT cPrompt OF oDlg PIXEL FONT oFont1 SIZE 420, 40
@ 70, 170 GET oGet VAR cFind OF oDlg PIXEL FONT oFontG SIZE 400, 36
* CUEBANNER "Find a setting"
oSay:lTransparent:=.t.
oDlg:bResized := <||
local oRect := oDlg:GetCliRect()
oSay:nLeft := oRect:nLeft +160
oSay:nTop := oRect:ntop + 30
oGet:nLeft := oRect:nLeft +170
oGet:nTop := oRect:nTop + 70
RETURN nil
>
*/
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT( oPanelScroll := CreatePanel( oDlg,oGet ),;
oPanelScroll:CheckResize(),;
eval(oDlg:bResized) )
return nil
//----------------------------------------------------------------------------//
function CreatePanel( oDlg,oGet )
local oPanel
local oBold
local aGrad := { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }
local aBtns := { ;
{ "System" + CRLF + "Screen, notifications," + CRLF + "power", 0xE770, { || Dummy() } }, ;
{ "Devices" + CRLF + "Bluetooth, printers," + CRLF + "mouse", 0xE772, { || Dummy() } }, ;
{ "Mobile" + CRLF + "Link your Android, iPhone" + CRLF, 0xE1C9, { || Dummy() } }, ;
{ "Network && Internet" + CRLF + "WIFI, flight mode" + CRLF + "VPN", 0xE12b, { || Dummy() } }, ;
{ "Personalization" + CRLF + "Background, lock screen" + CRLF, 0xE771, { || Dummy() } }, ;
{ "Apps" + CRLF + "Uninstall defaults" + CRLF + "Optional Features", 0xE179, { || Dummy() } }, ;
{ "Account" + CRLF + "Your account, email sync" + CRLF + "Work family", 0xE77B, { || Dummy() } }, ;
{ "Time and language" + CRLF + "Voice, region, date" + CRLF, 0xE775, { || Dummy() } }, ;
{ "Games" + CRLF + "Game bar, DVR," + CRLF + "retransmission and game mode", 0xE909, { || Dummy() } }, ;
{ "Accessibility" + CRLF + "Narrator, magnifying glass," + CRLF + "high contrast", 0xE776, { || Dummy() } }, ;
{ "Cortana" + CRLF + "Language of Cortana," + CRLF + "permissions, notifications", 0xECCA, { || Dummy() } }, ;
{ "Privacy" + CRLF + "Location Camera" + CRLF, 0xE1F6, { || Dummy() } }, ;
{ "Update && Security" + CRLF + "Windows Update" + CRLF + "Recovery", 0xE777, { || Dummy() } } ;
}
local nRow := 10
local nCol := 10
local nClrBack := CLR_WHITE
local nW := 200
local nH := 140
local nCBorder := 0xC38B2B
local nClrText := CLR_BLACK
local nClrBorder := 0xE6E6E6
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-14
DEFINE FONT oBold NAME "Segoe UI" SIZE 0,-14 BOLD
WITH OBJECT oGet
:bAction := { || Dummy() }
:cBmpName := 0xE11A
:lBtnTransparent := .t.
:CreateButton()
END
oPanel := TScrollPanel():New( 135,010,180,550,oDlg, .t. )
oPanel:nRightMargin := 2
oPanel:nBottomMargin := 5
oPanel:WinStyle(WS_BORDER, .f.)
oPanel:setcolor(CLR_WHITE,CLR_WHITE)
For x = 1 to Len( aBtns )
if x > 1
if Mod( x, 5 ) = 1
nRow += 200
nCol := 10
else
nCol += 200
endif
endif
@ nRow, nCol BTNBMP oBtn PROMPT aBtns[ x ][ 1 ] ;
RESOURCE aBtns[ x ][ 2 ] SIZE nW, nH PIXEL OF oPanel FLAT NOBORDER ;
COLOR nClrText, nClrBack
WITH OBJECT oBtn
:bAction := aBtns[ x ][ 3 ]
:nClrBorder := nClrBorder
:bColorMap := { | o | o:lBorder := o:lMOver, nCBorder }
:oFontBold := oBold
:lRound := .F.
END
Next x
oPanel:SetRange()
RELEASE FONT oFont, oBold
return oPanel
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
static function Dummy()
Return nil
//----------------------------------------------------------------------------//
static function WndResize( oWnd )
local oRect := oWnd:GetCliRect()
local nMargin, nRow, nCol, nCols, nBtnWidth, nBtns, nBtn, oBtn, n
for n := 1 to 2
oWnd:aControls[ n ]:nLeft := ( oRect:nWidth - oWnd:aControls[ n ]:nWidth ) / 2
next
nBtnWidth := 200
nCols := Min( 5, Int( oRect:nWidth / nBtnWidth ) - 1 )
nMargin := ( oRect:nWidth - nCols * nBtnWidth ) / 2
nBtns := Len( oWnd:aControls ) - 2
nRow := 170
nCol := nMargin
if nCols > 2
for nBtn := 1 to nBtns
WITH OBJECT ( oBtn := oWnd:aControls[ nBtn + 2 ] )
:cCaption := Trim( oBtn:cCaption )
:nTop := nRow
:nLeft := nCol
:nWidth := 200
:nHeight := 140
:nLayOut := LAYOUT_TOP
END
if nBtn % nCols == 0
nRow += 200
nCol := nMargin
else
nCol += nBtnWidth
endif
next
else
for nBtn := 1 to nBtns
WITH OBJECT ( oBtn := oWnd:aControls[ nBtn + 2 ] )
:cCaption += " "
:nTop := nRow
:nLeft := 30
:nWidth := oRect:nWidth - 60
:nHeight := 80
:nLayOut := LAYOUT_LEFT
END
nRow += 100
next
endif
return nil
//----------------------------------------------------------------------------//
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: oWnd:oClient := oPanel
Probable we can resize the arcontrols on Panel scroll , this can make you
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: oWnd:oClient := oPanel
Hello Silvio,
thank you.
Now I understand the problem.
I am testing on a WINDOWS SERVER 2012 computer and here it is looking like this:
Do you know if there is a solution to get the same look as with WINDOWS 10 OS.
Best regards
Otto
thank you.
Now I understand the problem.
I am testing on a WINDOWS SERVER 2012 computer and here it is looking like this:
Do you know if there is a solution to get the same look as with WINDOWS 10 OS.
Best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: oWnd:oClient := oPanel
How is the aspect of windows 10 os ?Otto wrote:Hello Silvio,
thank you.
Now I understand the problem.
I am testing on a WINDOWS SERVER 2012 computer and here it is looking like this:
Do you know if there is a solution to get the same look as with WINDOWS 10 OS.
Best regards
Otto
do you have a snap to see
NOw I am at school and here I have win 7
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: oWnd:oClient := oPanel
I try it on WINDOWS 10 pro 64 bit
It seem the same ...
wich is the our dialog ?
only perhaps we must found a solution to insert border blu on get control as inwin10
and see how resize the control on scroll panel
It seem the same ...
wich is the our dialog ?
only perhaps we must found a solution to insert border blu on get control as inwin10
and see how resize the control on scroll panel
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC