| Author | Topic: Round or oval XbpPushButton |
---|
| Itai Ben-Artzi | Round or oval XbpPushButton
on Sat, 29 Sep 2018 14:05:40 -0700Hi,
I am looking for a sample code for a round or oval XbpPushButton.
Many thanks,
-Itai |
| Jim Lee | Re: Round or oval XbpPushButton
on Sun, 30 Sep 2018 01:35:07 +0200hi,
> I am looking for a sample code for a round or oval XbpPushButton.
you can use CreateEllipticRgn() / SetWindowRgn() to create a Mask for Round
Control
RoundIco1.zip |
| Itai Ben-Artzi | Re: Round or oval XbpPushButton
on Sun, 30 Sep 2018 11:41:21 -0700Thank you, Jim.
I'm going to study this.
-Itai |
| Carlos a Beling | Re: Round or oval XbpPushButton
on Mon, 01 Oct 2018 18:22:16 -0300Hello Jim.
Good night.
Is it possible to change the color of the frame?
Fraternally
Beling
Em 29/09/2018 20:35, Jim Lee escreveu:
> hi,
>
>> I am looking for a sample code for a round or oval XbpPushButton.
>
> you can use CreateEllipticRgn() / SetWindowRgn() to create a Mask for Round
> Control
>
>
> |
| Jim Lee | Re: Round or oval XbpPushButton
on Tue, 02 Oct 2018 08:52:38 +0200> Is it possible to change the color of the frame?
Frame Color is not Part of visual Style.
visual Style paint Frame with
@USER32:DrawFrameControl(hDC, rcs, nDFCS )
@USER32:DrawFocusRect(hDC,@rcs)
you can simulate with Xbase++ Ownerdraw
IF BAnd(aInfo[3], XBP_DRAWSTATE_FOCUS) == XBP_DRAWSTATE_FOCUS
aLAttrs[GRA_AL_COLOR] := nColor1
GraSetAttrLine(oPS, aLAttrs)
aRect := ::CurrentSize()
aRect := {0, 0, aRect[1] - 1, aRect[2] - 1}
GraFocusRect(oPS, {aRect[1] + 3, aRect[2] + 3}, {aRect[3] - 2, aRect[4] -
2})
ENDIF
p.s. when using Windows Imagelist you can create you own visual Style so no
Color need
have a look at Pablo Website www.xbwin.com -> Forum |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Tue, 02 Oct 2018 09:13:33 +0200Carlos,
In the code that I sent you, you have the nBorderClr iVar that you can use
to assign any color. You can check its effect in the sample that is
included, also in the screenshot of my previous message.
Have not you received it?
Regards. Diego |
| Carlos a Beling | Re: Round or oval XbpPushButton
on Tue, 02 Oct 2018 11:30:27 -0300Hello Diego.
Unfortunately I did not receive. Could you please to send it again?
Fraternally
Beling
Em 02/10/2018 04:13, Jose Antonio Diego Kereje escreveu:
> Carlos,
>
> In the code that I sent you, you have the nBorderClr iVar that you can
> use to assign any color. You can check its effect in the sample that is
> included, also in the screenshot of my previous message.
>
> Have not you received it?
>
> Regards. Diego
> |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Sun, 30 Sep 2018 16:44:57 +0200Itai,
Xbase does not draw the curves with a good resolution. As much as possible,
I try not to use them. But integrating Jim's approach, I created a class to
manage rounded buttons.
I think the result is pretty good.
Regards. Diego Test.zip |
| Itai Ben-Artzi | Re: Round or oval XbpPushButton
on Sun, 30 Sep 2018 11:42:16 -0700Many, many thanks, Jose.
Looks perfect.
-Itai |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Sun, 30 Sep 2018 20:38:48 +0200I improved the code a bit to enable flat look and circular buttons.
Regards. Diego RoundPB.png |
| Carlos a Beling | Re: Round or oval XbpPushButton
on Mon, 01 Oct 2018 13:38:10 -0300Hello Diego.
Good afternoon. Would you like to share yours improveded code?
Fraternally
Beling
Em 30/09/2018 15:38, Jose Antonio Diego Kereje escreveu:
> I improved the code a bit to enable flat look and circular buttons.
>
> Regards. Diego |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Mon, 01 Oct 2018 20:27:43 +0200Sent to your mailbox.
Regards. Diego |
| Zupan Miran | Re: Round or oval XbpPushButton
on Tue, 02 Oct 2018 15:34:24 +0200Jose Antonio Diego Kereje je 30.09. 2018 ob 20:38 napisal:
> I improved the code a bit to enable flat look and circular buttons.
>
> Regards. Diego
Incredibly good work ... especially full round buttons
I work with TopDown library but this sample is something
completely different.
Would you be so kind and send me the modified code?
What about a text in two rows?
Best regards
Miran Zupan
Slovenia
spczupan@spc-zupan.si
---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus |
| Jim Lee | Re: Round or oval XbpPushButton
on Tue, 02 Oct 2018 23:06:44 +0200> What about a text in two rows?
you just need to enhance Style with BS_MULTILINE
oCheck1 := XbpPushButton():new()
oCheck1:caption := "AAAAAAAAA"+CHR(13)+CHR(10)+"BBBBBBBB"
oCheck1:create( , , aPos, {nIcoX,nIcoY} )
IF lPimpIt
PimpMyXb(oCheck1)
ENDIF
PROCEDURE PimpMyXb(oObj)
LOCAL hWnd
LOCAL nStyle
IF VALTYPE(oObj) = "O"
hWnd := oObj:GetHWnd()
oObj:hide()
nStyle := @user32:GetWindowLongA(hWnd, GWL_STYLE)
nStyle := nOr(nStyle, BS_MULTILINE)
@user32:SetWindowLongA(hWnd , GWL_STYLE , nStyle )
oObj:Show()
ENDIF
RETURN |
| Zupan Miran | Re: Round or oval XbpPushButton
on Wed, 03 Oct 2018 08:26:57 +0200Jim Lee je 2.10. 2018 ob 23:06 napisal:
> oCheck1:caption := "AAAAAAAAA"+CHR(13)+CHR(10)+"BBBBBBBB"
Ehhh
Thank you
I forgot the combination CHR(13)+CHR(10)
Best regards
Miran Zupan
---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Wed, 03 Oct 2018 00:12:52 +0200> What about a text in two rows?
That is simple and it is already enabled.
> Would you be so kind and send me the modified code?
I still want to make some changes. Later I will share the code.
Regards. Diego Samples.png |
| Jonathan Leeming | Re: Round or oval XbpPushButton
on Thu, 04 Oct 2018 21:32:06 -0600On 10/2/2018 4:12 PM, Jose Antonio Diego Kereje wrote:
>> What about a text in two rows?
>
> That is simple and it is already enabled.
>
>> Would you be so kind and send me the modified code?
>
> I still want to make some changes. Later I will share the code.
>
> Regards. Diego
Hi Diego,
I certainly like your round buttons and would appreciate it if you would
consider sharing your code with me.
Thanks... Jonathan |
| Jonathan Leeming | Re: Round or oval XbpPushButton
on Thu, 04 Oct 2018 21:41:34 -0600On 10/4/2018 9:32 PM, Jonathan Leeming wrote:
> On 10/2/2018 4:12 PM, Jose Antonio Diego Kereje wrote:
>>> What about a text in two rows?
>>
>> That is simple and it is already enabled.
>>
>>> Would you be so kind and send me the modified code?
>>
>> I still want to make some changes. Later I will share the code.
>>
>> Regards. Diego
> Hi Diego,
>
> I certainly like your round buttons and would appreciate it if you would
> consider sharing your code with me.
>
> Thanks... Jonathan
Oops... I was using my home computer and did not realize that my email
was not associated with my account / postings.
Thanks... Jonathan
jonathan.leeming@the-family-centre.com
Edmonton, Alberta, Canada |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Fri, 05 Oct 2018 13:32:26 +0200 |
| Jonathan Leeming | Re: Round or oval XbpPushButton
on Fri, 05 Oct 2018 08:34:57 -0600On 10/5/2018 5:32 AM, Jose Antonio Diego Kereje wrote:
> Sent!
>
> Regards. Diego.
Received!!!
Thanks to Diego & Jim Lee for creating a very nice class... definitely
created a lot of interest... 30 post and counting.
Thanks once again for sharing!
Regards... Jonathan
jonathan.leeming@the-family-centre.com
Edmonton, Alberta, Canada |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Wed, 03 Oct 2018 23:52:16 +0200 |
| M.B. Baiju | Re: Round or oval XbpPushButton
on Thu, 04 Oct 2018 07:05:37 +0200Hello Diego,
Your round button class picture I seen in the newsgroup. Can your share the
code for me ?
Regards,
M.B.BAIJU |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Thu, 04 Oct 2018 07:47:49 +0200 |
| Jorge L. Borlando | Re: Round or oval XbpPushButton
on Tue, 02 Oct 2018 11:35:55 -0300 |
| Osvaldo Ramirez | Re: Round or oval XbpPushButton
on Tue, 02 Oct 2018 10:56:56 -0700On 10/2/18 7:35 AM, Jorge L. Borlando wrote:
> Hola Diego, también podría pedirte que me pases tu código ?
> jlborlando@yahoo.com.ar
> saludos, Jorge
>
> "Jose Antonio Diego Kereje" wrote in message
> news:76100088$5532212e$36921@news.alaska-software.com...
>> I improved the code a bit to enable flat look and circular buttons.
>>
>> Regards. Diego
>
Como siempre, excelentes ejemplos...
Estimado Diego
Me uno a la peticion, ramirezosvaldo@yahoo.com
Gracias de antemano
Saludos
Osvaldo Ramirez |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Wed, 03 Oct 2018 23:44:16 +0200Hola Osvaldo,
¡Enviado!
Saludos. Diego |
| Carlos a Beling | Re: Round or oval XbpPushButton
on Thu, 04 Oct 2018 11:41:55 -0300Hello Diego.
Good morning.
Please send it to me. I lost the first one.
Fraternally
Beling
Em 03/10/2018 18:44, Jose Antonio Diego Kereje escreveu:
> Hola Osvaldo,
>
> ¡Enviado!
>
> Saludos. Diego |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Thu, 04 Oct 2018 17:03:42 +0200What is your email address?
I have sent it to you several times to beling@bipbip.com.br
Regards. Diego |
| Carlos a Beling | Re: Round or oval XbpPushButton
on Thu, 04 Oct 2018 12:13:51 -0300Hello Diego.
This e-mail is correct. I do not know what is going wrong. May be it
went to the spam box.
Please send it too to tassobr@aol.com
Fraternally
Beling
Em 04/10/2018 12:03, Jose Antonio Diego Kereje escreveu:
>
> What is your email address?
>
> I have sent it to you several times to beling@bipbip.com.br
>
> Regards. Diego |
| Carlos a Beling | Re: Round or oval XbpPushButton
on Fri, 05 Oct 2018 09:18:19 -0300Good morning Diego.
Sorry for bothering you.
Did you find it convenient to resend the programs to me?
I could not find them in the emails mentioned.
I need to investigate what's going on.
Fraternally
Beling
Em 04/10/2018 12:13, Carlos a Beling escreveu:
> Hello Diego.
> This e-mail is correct. I do not know what is going wrong. May be it
> went to the spam box.
> Please send it too to tassobr@aol.com
>
> Fraternally
> Beling
>
>
> Em 04/10/2018 12:03, Jose Antonio Diego Kereje escreveu:
>>
>> What is your email address?
>>
>> I have sent it to you several times to beling@bipbip.com.br
>>
>> Regards. Diego |
| Jorge L. Borlando | Re: Round or oval XbpPushButton
on Fri, 05 Oct 2018 12:38:30 -0300 |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Wed, 03 Oct 2018 23:46:12 +0200Hola Jorge,
¡Enviado!
Saludos. Diego |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Sat, 06 Oct 2018 22:16:28 +0200New class: RoundVerticalPB()
This is the latest version and I do not plan to make any more changes.
I send the new code to all of you who have the previous version.
Regards. Diego RoundPB and RoundVerticalPB.png |
| Jim Lee | Re: Round or oval XbpPushButton
on Sun, 07 Oct 2018 00:05:12 +0200 |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Sun, 07 Oct 2018 18:29:51 +0200Hi Jim,
Yes, I know everything you mention, because for a long time I have used the
:styleClass, :styleParts and :controlState iVars (you can find my message in
this same ng with the StyleClass iVar title, from April 1, 2015).
This thread is not about buttons (in general) and in your screenshot I do
not see anything that can not be done currently with the XbpImageButton
class of Xbase++. Neither, a competition.
In the thread three questions have been raised, the first essential and the
other two secondary:
1. Make rounded buttons (Itai Ben-Artzi).
2. Be able to have non-standard appearance (Carlos A. Beling).
3. The possibility of multiline text (Zupan Miran)
I compiled your sample here (and in Pablo’s site) I have not seen functional
rounded buttons, but yes, a great idea (the use of SetWindowRgn() function).
That's why I decided to develop a code that would answer these (and not
other) questions.
Regards. Diego |
| Jim Lee | Re: Round or oval XbpPushButton
on Mon, 08 Oct 2018 10:23:52 +0200hi Diego,
i just want to say that Checkbox is a Button which can be made round too
> and in your screenshot I do not see anything that can not be done
> currently with the XbpImageButton class of Xbase++. Neither, a
> competition.
in last row there are some PUSHLIKE Checkbox as Button so you see no
Difference
PUSHLIKE Checkbox will stay down when o:Select. |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Mon, 08 Oct 2018 11:09:01 +0200Hi Jim,
I apologize, I did not mean to be rude or look angry. I do not speak English
and it's hard for me to be able to express the usual nuances of a language.
My "problem" with your last screenshot is that I think it's out of the
question of rounded buttons. I just wanted to express that.
Here we say: The relevant information helps, too much information only
generates noise.
Regards. Diego |
| Carlos a Beling | Re: Round or oval XbpPushButton
on Mon, 08 Oct 2018 17:59:45 -0300Hello Diego.
Good night.
I could not to find the Class XbpImageButton() in my Xbase++ 2.0
Foundaton documentation. Could you please to show to me where I can
finding it?
Faternally
Beling
Em 07/10/2018 13:29, Jose Antonio Diego Kereje escreveu:
> Hi Jim,
>
> Yes, I know everything you mention, because for a long time I have used
> the :styleClass, :styleParts and :controlState iVars (you can find my
> message in this same ng with the StyleClass iVar title, from April 1,
> 2015).
>
> This thread is not about buttons (in general) and in your screenshot I
> do not see anything that can not be done currently with the
> XbpImageButton class of Xbase++. Neither, a competition.
>
> In the thread three questions have been raised, the first essential and
> the other two secondary:
>
> 1. Make rounded buttons (Itai Ben-Artzi).
> 2. Be able to have non-standard appearance (Carlos A. Beling).
> 3. The possibility of multiline text (Zupan Miran)
>
> I compiled your sample here (and in Pablo’s site) I have not seen
> functional rounded buttons, but yes, a great idea (the use of
> SetWindowRgn() function). That's why I decided to develop a code that
> would answer these (and not other) questions.
>
> Regards. Diego |
| Jim Lee | Re: Round or oval XbpPushButton
on Tue, 09 Oct 2018 03:53:40 +0200> I could not to find the Class XbpImageButton() in my Xbase++ 2.0
CLASS XbpImageButton / XbpImageTabPage are from "Service Pack 1" for v1.9x |
| Carlos A Beling | Re: Round or oval XbpPushButton
on Tue, 09 Oct 2018 09:07:23 -0300Hello JIm.
Good morning.
Many thanks.
Bad notice...
Fraternally
Beling
Em 08/10/2018 22:53, Jim Lee escreveu:
>> I could not to find the Class XbpImageButton() in my Xbase++ 2.0
>
> CLASS XbpImageButton / XbpImageTabPage are from "Service Pack 1" for v1.9x
>
> |
| Osvaldo Ramirez | Re: Round or oval XbpPushButton
on Mon, 08 Oct 2018 13:13:39 -0700On 10/6/18 1:16 PM, Jose Antonio Diego Kereje wrote:
> New class: RoundVerticalPB()
>
> This is the latest version and I do not plan to make any more changes.
>
> I send the new code to all of you who have the previous version.
>
> Regards. Diego
Excelent!!!, Good job Diego
Best Regards
Osvaldo Ramirez |
| Zupan Miran | Re: Round or oval XbpPushButton
on Mon, 08 Oct 2018 22:59:33 +0200Hi to all "Round Buttons" lovers ...
just a hint (which all you already know ...)
oXbp := RoundPB():new()
oXbp:tabStop := .T.
oXbp:caption := TXT_CLOSE
oXbp:nHoverClr:= GRA_CLR_ORANGE
//*** you can change the font for every button with ....
oXbp:SetFontCompoundName( "12.Segoe UI" )
oXbp:create( oDlg:drawingArea,, { aSize[ 1 ] - 188, aSize[ 2 ] - 280 }, { 28, 150 } )
Regards
Miran Zupan
---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus |
| Peter Alderliesten | Re: Round or oval XbpPushButton
on Tue, 09 Oct 2018 09:38:40 +0200Diego,
> New class: RoundVerticalPB()
> This is the latest version and I do not plan to make any more changes.
> I send the new code to all of you who have the previous version.
They look beautiful.
I was just lurking to see how this would work out.
Didn't request a previous version, but I am interested in the final result.
Could I receive a copy of the source code as well, or would you share it
here?
Thanks a lot.
Peter |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Wed, 10 Oct 2018 00:10:19 +0200Hi,
New public version with cosmetic changes (uff!... the curves and Xbase++ do
not "marry" well), support for TopLeft and BottomLeft origin, and execution
of the :activate codeblock when pressing Return and Space Bar.
As always, the best result is obtained by using the topleft origin.
Regards. Diego
PS: I had the curiosity to know the interest in these things... Test.zip |
| Jim Lee | Re: Round or oval XbpPushButton
on Wed, 10 Oct 2018 02:17:06 +0200> New public version with cosmetic changes (uff!... the curves and Xbase++
> do
> not "marry" well), support for TopLeft and BottomLeft origin, and
> execution
> of the :activate codeblock when pressing Return and Space Bar.
THX for your great Work.
> PS: I had the curiosity to know the interest in these things...
i guess People love to pimp there Apps |
| Carlos A Beling | Re: Round or oval XbpPushButton
on Wed, 10 Oct 2018 10:25:37 -0300I agree.
Em 09/10/2018 21:17, Jim Lee escreveu:
>> New public version with cosmetic changes (uff!... the curves and Xbase++
>> do
>> not "marry" well), support for TopLeft and BottomLeft origin, and
>> execution
>> of the :activate codeblock when pressing Return and Space Bar.
>
> THX for your great Work.
>
>> PS: I had the curiosity to know the interest in these things...
>
> i guess People love to pimp there Apps
>
> |
| Carlos A Beling | Re: Round or oval XbpPushButton
on Wed, 10 Oct 2018 10:27:57 -0300Hello Diego.
Many thanks again.
Fraternally
Beling
Em 09/10/2018 21:17, Jim Lee escreveu:
>> New public version with cosmetic changes (uff!... the curves and Xbase++
>> do
>> not "marry" well), support for TopLeft and BottomLeft origin, and
>> execution
>> of the :activate codeblock when pressing Return and Space Bar.
>
> THX for your great Work.
>
>> PS: I had the curiosity to know the interest in these things...
>
> i guess People love to pimp there Apps
>
> |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Wed, 10 Oct 2018 19:07:12 +0200Jim,
Thank you for your contribution, without it I would not have developed this
code.
Regards. Diego |
| Jose Antonio Diego Kereje | Re: Round or oval XbpPushButton
on Wed, 10 Oct 2018 19:03:45 +0200Hi,
Correction of the visual mismatch generated when the Return/Spacebar key is
pressed and then the button is clicked.
Regards. Diego Test.zip |
| Peter Alderliesten | Re: Round or oval XbpPushButton
on Mon, 15 Oct 2018 10:36:15 +0200Diego,
> PS: I had the curiosity to know the interest in these things...
My apps all have a business look.
Peolple find my apps very usefull and easy to use, but as they make use of
the standard interface elements, they find them look dull as well.
I wanted to start a project on this and your buttons will help me to get a
headstart on this.
Thanks,
Peter |
| Bill Simmeth | notifications
on Wed, 24 Oct 2018 15:32:22 +0200 |