oPopUp in class btnbmp
oPopUp in class btnbmp
I often use btnBmp: oPopUp, but in the button the horizontal space reserved for the PopUp is tight.
It is possible in future versions to have a variable to fix the width directly in the btnbmp class. prg?
(Now I modified the btnbmp.prg class to enlarge it)
Maurizio
It is possible in future versions to have a variable to fix the width directly in the btnbmp class. prg?
(Now I modified the btnbmp.prg class to enlarge it)
Maurizio
- Antonio Linares
- Site Admin
- Posts: 42520
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: oPopUp in class btnbmp
Dear Maurizio,
Would you mind to post here your modifications ?
many thanks
Would you mind to post here your modifications ?
many thanks
- karinha
- Posts: 7935
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: oPopUp in class btnbmp
As you did? Show us, using this template, please.
¿Como tú hiciste? Muéstranos, usando esta plantilla, por favor.
Gracias, thanks.
Regards, saludos.
¿Como tú hiciste? Muéstranos, usando esta plantilla, por favor.
Code: Select all | Expand
// C:\FWH..\SAMPLES\PICTCOLO.PRG
#Include "FiveWin.ch"
FUNCTION Main()
LOCAL oDlg , oMenuPop, oBtnX, oBtnX2, MENU, oFont, aGrad
LOCAL nColor1 := CLR_BLACK
LOCAL nColor2 := CLR_WHITE
SET _3DLOOK ON
SetBalloon( .T. )
SkinButtons()
MENU oMenuPop POPUP 2007
MENUITEM "First " ACTION MsgInfo( "first" )
SEPARATOR
MENUITEM "Second " ACTION MsgInfo( "second" )
SEPARATOR
MENUITEM "Colores " ACTION( PicKColors( oBtnx, oDlg,, "gray" ) )
ENDMENU
aGrad := { { 0.30, CLR_WHITE, CLR_HCYAN },{ 0.50, CLR_WHITE, CLR_HCYAN } }
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -16 BOLD
DEFINE DIALOG oDlg SIZE 500, 400 PIXEL TRUEPIXEL RESIZABLE ;
TITLE "Tavolozza colori numeri" GRADIENT aGrad FONT oFont
oDlg:lhelpIcon := .F.
@ 50, 50 BTNBMP oBtnx SIZE 60, 60 PIXEL OF oDlg FLAT NOBORDER ;
PROMPT "Color" FILENAME "..\bitmaps\16x16\floppy.bmp" BOTTOM ;
COLOR nColor1, nColor2 ;
ACTION( PicKColors( oBtnx, oDlg,, "gray" ) )
oDlg:aControls[ 1 ]:oPopup := oMenuPop
@ 50, 120 BTNBMP oBtnx2 SIZE 60, 60 PIXEL OF oDlg FLAT NOBORDER ;
PROMPT "Exit" FILENAME "..\bitmaps\16x16\Exit.bmp" BOTTOM ;
COLOR CLR_BLACK, nRgb( 238, 236, 219 ) ;
ACTION( oDlg:End() )
oBtnX2:lCancel := .T.
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
RETURN NIL
FUNCTION PicKColors( ocontrol, oParent, lHex, cColore )
LOCAL oDlgSel, oPanel
LOCAL aColors := {}
LOCAL aReturnvalue := {}
LOCAL nSelection := 1
DEFAULT lHex := .F.
DEFINE DIALOG oDlgSel SIZE 400, 200 PIXEL
oDlgSel:nStyle = nOR( WS_CHILD, WS_BORDER, WS_VISIBLE, WS_POPUP )
ACTIVATE DIALOG oDlgSel CENTERED
RETURN NIL
// FIN / END
Gracias, thanks.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- Silvio.Falconi
- Posts: 7136
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: oPopUp in class btnbmp
Karinha
Please erase the FUNCTION AdjustWnd( oBtn, nWidth, nHeight ) we havent the autorization to publish it !!!
Please erase the FUNCTION AdjustWnd( oBtn, nWidth, nHeight ) we havent the autorization to publish it !!!
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- karinha
- Posts: 7935
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: oPopUp in class btnbmp
Silvio.Falconi wrote:Karinha
Please erase the FUNCTION AdjustWnd( oBtn, nWidth, nHeight ) we havent the autorization to publish it !!!
Dear Silvio, I didn't know that you were the owner of this function, since he is PUBLIC. But it's ok, I removed it. I don't agree with your position, but it's done.
Estimado Silvio, no sabía que eras el dueño de esta función, ya que es PÚBLICO. Pero está bien, lo eliminé. No estoy de acuerdo con tu posición, pero ya está hecho.
Look at the function here:
Mira la función aquí:
http://www.pctoledo.com.br/forum/viewtopic.php?f=2&t=1170&p=3643&hilit=+dificil+aprendizado+
Is it good for you like this?
¿Te hace bien así?
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- karinha
- Posts: 7935
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: oPopUp in class btnbmp
Dear Silvio, here you made it PUBLIC as well. The moment you post a source code on FORUM, the source code belongs to all FIVEWIN users. It's the rules, if you understand that you won't be able to fit the forum rules, feel free to stay or leave honorably.
Estimado Silvio, aquí lo hiciste PÚBLICO también. En el momento en que publica un código fuente en FORUM, el código fuente pertenece a todos los usuarios de FIVEWIN. Son las reglas, si entiendes que no podrás ajustarte a las reglas del foro, siéntete libre de quedarte o irte honorablemente.
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=42263&sid=4be501ba081a38054668e56d743cf050
Gracias, thanks.
Regards, saludos.
Estimado Silvio, aquí lo hiciste PÚBLICO también. En el momento en que publica un código fuente en FORUM, el código fuente pertenece a todos los usuarios de FIVEWIN. Son las reglas, si entiendes que no podrás ajustarte a las reglas del foro, siéntete libre de quedarte o irte honorablemente.
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=42263&sid=4be501ba081a38054668e56d743cf050
Gracias, thanks.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- Silvio.Falconi
- Posts: 7136
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: oPopUp in class btnbmp
karinha wrote:Dear Silvio, here you made it PUBLIC as well. The moment you post a source code on FORUM, the source code belongs to all FIVEWIN users. It's the rules, if you understand that you won't be able to fit the forum rules, feel free to stay or leave honorably.
Estimado Silvio, aquí lo hiciste PÚBLICO también. En el momento en que publica un código fuente en FORUM, el código fuente pertenece a todos los usuarios de FIVEWIN. Son las reglas, si entiendes que no podrás ajustarte a las reglas del foro, siéntete libre de quedarte o irte honorablemente.
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=42263&sid=c80da79f41eccdffd408d2a6abdc50d2
Gracias, thanks.
Regards, saludos.
I Know well the forum rules
every now and then in this forum some characters come out who believe themselves masters on earth and on the world and also professors who are experts in the rules of the fivetech software forum and we seniors have to succumb
on that topic I not see that function in my message but only on your message , you published a not mine function I sent you via private mail!!!
the function is of José Luis Sánchez of Alanit Software and integrated on Tinforme class
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Antonio Linares
- Site Admin
- Posts: 42520
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: oPopUp in class btnbmp
Dear Silvio,
function AdjustWnd() is public on github posted by Jose Luis:
https://github.com/JoseluisSanchez/colossus/blob/0dcf9170fb24c33dd973520097f39a5e3d1d4780/prg/ut_common.prg
Lets try to help Maurizio here, thanks
function AdjustWnd() is public on github posted by Jose Luis:
https://github.com/JoseluisSanchez/colossus/blob/0dcf9170fb24c33dd973520097f39a5e3d1d4780/prg/ut_common.prg
Lets try to help Maurizio here, thanks
- Silvio.Falconi
- Posts: 7136
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: oPopUp in class btnbmp
Antonio Linares wrote:Dear Silvio,
function AdjustWnd() is public on github posted by Jose Luis:
https://github.com/JoseluisSanchez/colossus/blob/0dcf9170fb24c33dd973520097f39a5e3d1d4780/prg/ut_common.prg
Lets try to help Maurizio here, thanks
Antonio, Te expliqué en privado.
josè de alanit si bien ha publicado sus fuentes de github no ha liberado ningún tipo de licencia y eso quiere decir que en realidad no tenemos el permiso para publicarlas en un foro público
![Image](https://i.postimg.cc/90dRtxdv/hhhhh.png)
Tuve un pseudo problema con btnbmp unos días (ver atrás https://forums.fivetechsupport.com/viewtopic.php?f=3&t=42263&sid=a4880c7facc5b2f5f8af8d234ff88a47), luego me di por vencido y ahora uso un control tget
Last edited by Silvio.Falconi on Sun Oct 16, 2022 9:29 am, edited 2 times in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Silvio.Falconi
- Posts: 7136
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: oPopUp in class btnbmp
Maurizio wrote:I often use btnBmp: oPopUp, but in the button the horizontal space reserved for the PopUp is tight.
It is possible in future versions to have a variable to fix the width directly in the btnbmp class. prg?
(Now I modified the btnbmp.prg class to enlarge it)
Maurizio
Sorry Mauri,
I not understood, are you talking about space see orange arrow?
![Image](https://i.postimg.cc/4xw02BLR/JJ.png)
I think you must modify PaintPopupSection() method
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Re: oPopUp in class btnbmp
I use April 2022 to June 2022
the changes I made are :
line 18
#define POPWIDTH 30 //12
new variable in line 129
DATA nWide_P
set variable line 325
::nWide_P := 22
and line 503
::nWide_P := 22
Line 525
If( oPopup != nil, ::nWide_P, 0 ) //// My_modi If( oPopup != nil, 13, 0 )
Line 578
//::oWnd:nWidth := ::oWnd:nBtnWidth + If( ::oWnd:l3D, 3, 1 ) + 13 + 1
::oWnd:nWidth := ::oWnd:nBtnWidth + If( ::oWnd:l3D, 3, 1 ) + ::nWide_P + 1
Line 1062
//if nCol >= ::nWidth() - 13
if nCol >= ::nWidth() - ::nWide_P
Line 2079
//MoveTo( hDC, nWidth - 12 + If( ::lPressed, 1, 0 ), 1 )
//LineTo( hDC, nWidth - 12 + If( ::lPressed, 1, 0 ), nHeight - 1 )
MoveTo( hDC, nWidth - ::nWide_P - 1 + If( ::lPressed, 1, 0 ), 1 )
LineTo( hDC, nWidth - ::nWide_P - 1 + If( ::lPressed, 1, 0 ), nHeight - 1 )
SelectObject( hDC, hDarkPen )
//MoveTo( hDC, nWidth - 13 + If( ::lPressed, 1, 0 ), 1 )
//LineTo( hDC, nWidth - 13 + If( ::lPressed, 1, 0 ), nHeight - 1 )
MoveTo( hDC, nWidth - ::nWide_P + If( ::lPressed, 1, 0 ), 1 )
LineTo( hDC, nWidth - ::nWide_P + If( ::lPressed, 1, 0 ), nHeight - 1 )
Maurizio
the changes I made are :
line 18
#define POPWIDTH 30 //12
new variable in line 129
DATA nWide_P
set variable line 325
::nWide_P := 22
and line 503
::nWide_P := 22
Line 525
If( oPopup != nil, ::nWide_P, 0 ) //// My_modi If( oPopup != nil, 13, 0 )
Line 578
//::oWnd:nWidth := ::oWnd:nBtnWidth + If( ::oWnd:l3D, 3, 1 ) + 13 + 1
::oWnd:nWidth := ::oWnd:nBtnWidth + If( ::oWnd:l3D, 3, 1 ) + ::nWide_P + 1
Line 1062
//if nCol >= ::nWidth() - 13
if nCol >= ::nWidth() - ::nWide_P
Line 2079
//MoveTo( hDC, nWidth - 12 + If( ::lPressed, 1, 0 ), 1 )
//LineTo( hDC, nWidth - 12 + If( ::lPressed, 1, 0 ), nHeight - 1 )
MoveTo( hDC, nWidth - ::nWide_P - 1 + If( ::lPressed, 1, 0 ), 1 )
LineTo( hDC, nWidth - ::nWide_P - 1 + If( ::lPressed, 1, 0 ), nHeight - 1 )
SelectObject( hDC, hDarkPen )
//MoveTo( hDC, nWidth - 13 + If( ::lPressed, 1, 0 ), 1 )
//LineTo( hDC, nWidth - 13 + If( ::lPressed, 1, 0 ), nHeight - 1 )
MoveTo( hDC, nWidth - ::nWide_P + If( ::lPressed, 1, 0 ), 1 )
LineTo( hDC, nWidth - ::nWide_P + If( ::lPressed, 1, 0 ), nHeight - 1 )
Maurizio
- Antonio Linares
- Site Admin
- Posts: 42520
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: oPopUp in class btnbmp
Dear Maurizio,
good morning
would you mind to post the complete PRG here ?
many thanks
good morning
would you mind to post the complete PRG here ?
many thanks
- Silvio.Falconi
- Posts: 7136
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: oPopUp in class btnbmp
Maurizio wrote:I use April 2022 to June 2022
the changes I made are :
line 18
#define POPWIDTH 30 //12
new variable in line 129
DATA nWide_P
set variable line 325
::nWide_P := 22
and line 503
::nWide_P := 22
Line 525
If( oPopup != nil, ::nWide_P, 0 ) //// My_modi If( oPopup != nil, 13, 0 )
Line 578
//::oWnd:nWidth := ::oWnd:nBtnWidth + If( ::oWnd:l3D, 3, 1 ) + 13 + 1
::oWnd:nWidth := ::oWnd:nBtnWidth + If( ::oWnd:l3D, 3, 1 ) + ::nWide_P + 1
Line 1062
//if nCol >= ::nWidth() - 13
if nCol >= ::nWidth() - ::nWide_P
Line 2079
//MoveTo( hDC, nWidth - 12 + If( ::lPressed, 1, 0 ), 1 )
//LineTo( hDC, nWidth - 12 + If( ::lPressed, 1, 0 ), nHeight - 1 )
MoveTo( hDC, nWidth - ::nWide_P - 1 + If( ::lPressed, 1, 0 ), 1 )
LineTo( hDC, nWidth - ::nWide_P - 1 + If( ::lPressed, 1, 0 ), nHeight - 1 )
SelectObject( hDC, hDarkPen )
//MoveTo( hDC, nWidth - 13 + If( ::lPressed, 1, 0 ), 1 )
//LineTo( hDC, nWidth - 13 + If( ::lPressed, 1, 0 ), nHeight - 1 )
MoveTo( hDC, nWidth - ::nWide_P + If( ::lPressed, 1, 0 ), 1 )
LineTo( hDC, nWidth - ::nWide_P + If( ::lPressed, 1, 0 ), nHeight - 1 )
Maurizio
I hae another release and not found th eline number you wrote
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Antonio Linares
- Site Admin
- Posts: 42520
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
- Silvio.Falconi
- Posts: 7136
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: oPopUp in class btnbmp
Antonio Linares wrote:Dear Silvio,
Thats why I asked Maurizio to post the complete PRG
I asked now via private mail ...same question
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com