oButton:hide() & oButton:show()

oButton:hide() & oButton:show()

Postby JC » Wed Nov 12, 2008 6:24 pm

Antonio and friends,

Why the methods :hide() & :show() not works?
I had to use the following way:
Code: Select all  Expand view
oDlg:bPainted := {|| showWindow( oButton:hWnd, 0 ) }


Why?
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby ukoenig » Wed Nov 12, 2008 7:03 pm

Hello JC,

You have to use the Button-object
oBtn:Show(), oBtn:Hide()
A sample to Hide a Button inside a buttonbar to get a space
between buttons.

Code: Select all  Expand view
DEFINE WINDOW oWnd TITLE "Test"  MDI MENU TMenu():New()

DEFINE BUTTONBAR oBar OF oWnd SIZE 80, 80 2007 RIGHT

oBar:bClrGrad :=  { | lInvert | If( ! lInvert, ;
{ { 0.90,11892819,16777215 },{ 0.90,16777215,11892819 } },;
{ { 0.50,128,16777215 }, { 0.50,16777215,128 } } ) }

oBar:nClrText := 0

DEFINE BUTTON oBtn50 OF oBar ACTION Test1() ;
RESOURCE "magic" PROMPT "Project" + CRLF + "Selection" TOOLTIP "Bar-Select"

DEFINE BUTTON oBtn51 OF oBar ACTION Test2() ;
RESOURCE "open" PROMPT "Open" + CRLF + "Project" TOOLTIP "Open Project"

DEFINE BUTTON oBtn52 OF oBar ACTION Test3() ;
RESOURCE "floppy" PROMPT "Save" + CRLF + "Project" TOOLTIP "Save Project"

DEFINE BUTTON oBtn53 OF oBar ACTION Test4() ;
RESOURCE "magic" PROMPT "Create" + CRLF + "EXE-File" TOOLTIP "New EXE-File"

DEFINE BUTTON oBtn54 OF oBar ACTION Test5() ;
RESOURCE "info2" PROMPT "Change" + CRLF + "FWH-Version" TOOLTIP "Change FWH-Version"

// This button is HIDE for a space between last button and exit !!!
// ------------------------------------------------------------------------
DEFINE BUTTON oBtn55 OF oBar ACTION NIL;
RESOURCE "calendar"

oBtn55:Hide()

DEFINE BUTTON oBtn56 OF oBar ACTION oWnd:End() ;
RESOURCE "quit" PROMPT "Exit" TOOLTIP "Close Bar-Gradient"

SET MESSAGE OF oWnd TO "Testing the ButtonBar 2007 Office look" ;
CENTERED CLOCK KEYBOARD 2007

ACTIVATE WINDOW oWnd MAXIMIZED ;
ON PAINT gradpaint0( hDC, oWnd ) ;
VALID MsgYesNo( "Do you want to end?" )

RETURN NIL



Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 50 guests