How to Resize Button in program?

How to Resize Button in program?

Postby dutch » Mon May 17, 2010 8: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 19.01 / 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)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How to Resize Button in program?

Postby Antonio Linares » Mon May 17, 2010 9:40 pm

Dutch,

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

or:

oButton:nWidth := nNewWidth
oButton:nHeight := nNewHeight
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How to Resize Button in program?

Postby dutch » Mon May 17, 2010 9: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 19.01 / 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)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How to Resize Button in program?

Postby Antonio Linares » Mon May 17, 2010 9:54 pm

Dutch,

Code: Select all  Expand view

oButton:lDrag := .T.
oButton:ShowDots()
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How to Resize Button in program?

Postby dutch » Mon May 17, 2010 10:03 pm

Dear Antonio,
Antonio Linares wrote:Dutch,

Code: Select all  Expand view

oButton:lDrag := .T.
oButton:ShowDots()
 

It cannot resize button. I means resize in horizontal.

Regards,
Dutch
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How to Resize Button in program?

Postby mmercado » Tue May 18, 2010 1: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: Select all  Expand view
#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
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: How to Resize Button in program?

Postby dutch » Tue May 18, 2010 8:18 am

Dear Manuel,

The sample is exactly what I want but the really what I need is TSBUTTON().
Code: Select all  Expand view
    @ 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 19.01 / 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)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How to Resize Button in program?

Postby mmercado » Tue May 18, 2010 8: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: Select all  Expand view
#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
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: How to Resize Button in program?

Postby Silvio » 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How to Resize Button in program?

Postby mmercado » Tue May 18, 2010 6: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
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: How to Resize Button in program?

Postby MdaSolution » Tue May 18, 2010 6: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


Image

Isent you my sample but perhaps I not Know how explan you my problem !
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: How to Resize Button in program?

Postby dutch » Fri May 21, 2010 6:31 am

Dear All,

Thank you for all idea.

Regards,
Dutch
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests