FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Can a toolbar button be of different size?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Can a toolbar button be of different size?
Posted: Tue May 31, 2022 06:03 AM

I normally create a toolbar using the command DEFINE BUTTONBAR oBar OF oWnd SIZE 30,33
Is it possible to have one button that is actually longer than that?
TIA

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Can a toolbar button be of different size?
Posted: Tue May 31, 2022 07:30 PM
Any button created by "DEFINE BUTTON OF oBar" will be of the same size only.
But after defining all buttons, we can create any control on the bar in the space not occupied by the buttons. Same way we can create a button of different width by
Code (fw): Select all Collapse
@ r, c BTNBMP oBtn PROMPT "prompt" OF oBar SIZE w,h PIXEL
Regards



G. N. Rao.

Hyderabad, India
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Can a toolbar button be of different size?
Posted: Wed Jun 01, 2022 02:21 AM

Thank you for the reply Rao.
I'll experiment with it a bit

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Can a toolbar button be of different size?
Posted: Wed Jun 01, 2022 03:27 AM

For some reason, I nothing happens when I click on the button.
But was able triggering it programmatically using oBtn:click(). Strange

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Can a toolbar button be of different size?
Posted: Wed Jun 01, 2022 08:36 AM
hua wrote:For some reason, I nothing happens when I click on the button.
But was able triggering it programmatically using oBtn:click(). Strange


Discoevered the reason. I can't place @ r, c BTNBMP oBtn PROMPT "prompt" OF oBar SIZE w,h PIXEL at oDlg:bInit
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Can a toolbar button be of different size?
Posted: Wed Jun 01, 2022 08:36 AM
hua wrote:For some reason, I nothing happens when I click on the button.
But was able triggering it programmatically using oBtn:click(). Strange


Discovered the reason. I can't place @ r, c BTNBMP oBtn PROMPT "prompt" OF oBar SIZE w,h PIXEL at oDlg:bInit
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion