FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to Resize Button in program?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How to Resize Button in program?
Posted: Mon May 17, 2010 08:47 PM

Dear All,

I would like to resize the button (same concept with visual design as ::lDrag is move). How can I resize the button in my program as in workshop?

Thanks for any idea.

Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to Resize Button in program?
Posted: Mon May 17, 2010 09:40 PM

Dutch,

oButton:SetSize( nWidth, nHeight [, lRepaint ] )

or:

oButton:nWidth := nNewWidth
oButton:nHeight := nNewHeight

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to Resize Button in program?
Posted: Mon May 17, 2010 09:45 PM

Dear Antonio,

Thanks for prompt reply but I need to resize with mouse as in BRW. It like to move with mouse by ::lDrag.

Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to Resize Button in program?
Posted: Mon May 17, 2010 09:54 PM
Dutch,

Code (fw): Select all Collapse
oButton:lDrag := .T.
oButton:ShowDots()
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to Resize Button in program?
Posted: Mon May 17, 2010 10:03 PM
Dear Antonio,
Antonio Linares wrote:Dutch,

Code (fw): Select all Collapse
oButton:lDrag := .T.
oButton:ShowDots()

It cannot resize button. I means resize in horizontal.

Regards,
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: How to Resize Button in program?
Posted: Tue May 18, 2010 01:48 AM
Hello Dutch:
dutch wrote:I would like to resize the button (same concept with visual design as *::lDrag* is move). How can I resize the button in my program as in workshop?

Here you are a working sample.
Code (fw): Select all Collapse
#include "FiveWin.ch"

Function Main()

   Local oWnd, oBtn, ;
         nTop    := 20, ;
         nLeft   := 20, ;
         lPixel  := .T., ;
         lDrag   := .T., ;
         nWidth  := 60, ;
         nHeight := 40

   DEFINE Window oWnd

   oBtn := TButton():New( nTop, nLeft, "&Test", oWnd, {|| Nil }, nWidth, nHeight,,,, lPixel, lDrag )

   Activate Window oWnd

Return Nil

Best regards.

Manuel Mercado Gómez.
manuelmercado at prodigy dot net dot mx
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to Resize Button in program?
Posted: Tue May 18, 2010 08:18 AM
Dear Manuel,

The sample is exactly what I want but the really what I need is TSBUTTON().
Code (fw): Select all Collapse
    @ nRow, nCol SBUTTON oBtns[nShow] PROMPT cName ;
                     SIZE nWidth, nHeight ;
                     FONT oFnt[3] ;
                     OF oDlg ;
                     TEXT POSITION ON_LEFT ;    
                     ROUNDRECT ;
                     W97 ;
                     TOOLTIP cFullName ;
                     PIXEL COLOR CLR_WHITE, CLR_RED ;
                     ACTION RoomInfo( ltrim(aName[nShow][4]), cStatus )
             oBtns[nShow]:lDrag := .T.

It can move but cannot resize.

Regards,
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: How to Resize Button in program?
Posted: Tue May 18, 2010 08:58 AM
Dear Dutch:
dutch wrote:The sample is exactly what I want but the really what I need is TSBUTTON()

Here you are a working sample with TSButton:
Code (fw): Select all Collapse
#include "FiveWin.ch"

Function Main()

   Local oWnd, oBtn, ;
         nTop    := 20, ;
         nLeft   := 20, ;
         lPixel  := .T., ;
         lDrag   := .T., ;
         nWidth  := 60, ;
         nHeight := 60, ;
         cShape  := "CRYSTAL", ;
         nCapPos := 3 // caption at bottom

   DEFINE Window oWnd

   oBtn := TSButton():New( nTop, nLeft, "&Test", oWnd,, { "\fwh\bitmaps\Save16.bmp" }, ;
                           { nWidth, nHeight }, lPixel, {||Nil},,,,,,,,,,,, nCapPos,,, cShape,,, lDrag )

   Activate Window oWnd

Return Nil

Best regards.

Manuel Mercado Gómez.
manuelmercado at prodigy dot net dot mx
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: How to Resize Button in program?
Posted: Tue May 18, 2010 11:49 AM

Manuel,
when you drag this button, it create a hand into control, do you see it ?
it make also a box arround the control with gray color, do you see it ?
when you use this drag and move it you can see the button smaller do you see it
perhaps there is an error

Best Regards, Saludos



Falconi Silvio
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: How to Resize Button in program?
Posted: Tue May 18, 2010 06:19 PM
Hello Silvio:
Silvio wrote:
when you drag this button, it create a hand into control, do you see it ?
Yes, I do.

Silvio wrote:it make also a box arround the control with gray color, do you see it ?
Yes, I do.

Silvio wrote:when you use this drag and move it you can see the button smaller do you see it
No, I don't see the button smaller, I see the rectangle bigger than dots boundaries.

Silvio wrote:perhaps there is an error
Perhaps, in TControl Class

Best regards.

Manuel Mercado Gómez.
manuelmercado at prodigy dot net dot mx
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: How to Resize Button in program?
Posted: Tue May 18, 2010 06:59 PM
Maestro,

strange ....I have the same error !!

On this picture you can see I cannot put the bitmap = near to +

all picture are 64,64 size




Isent you my sample but perhaps I not Know how explan you my problem !
FWH .. BC582.. xharbour
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to Resize Button in program?
Posted: Fri May 21, 2010 06:31 AM

Dear All,

Thank you for all idea.

Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)

Continue the discussion