Partial clear screen

Moderator: Rathinagiri

asharpham
Posts: 55
Joined: Sat Mar 24, 2018 2:48 pm
DBs Used: DBF

Re: Partial clear screen

Post by asharpham »

Thanks Rathinagiri. Before sending the entire code I'll show you where this is called from. If you can't work it out from here, I'm happy to zip up the entire code and files.

The code calling the procedure is:
DEFINE TOOLBAR ToolBar_2 BUTTONSIZE 150,35 FLAT BORDER BOTTOM

BUTTON SEARCH ;
CAPTION '&Search' ;
PICTURE 'IconSearch.bmp' ;
ACTION { SeekText() , Library_1.Seek1.SetFocus , Refresh() }


This is followed by:
PROCEDURE SeekText

IF IsControlDefined ( 'LABEL_Search' , 'Library_1' )
DoMethod ( 'Library_1' , 'LABEL_Search' , 'Release' )
ENDIF

IF IsControlDefined ( 'Seek1' , 'Library_1' )
DoMethod ( 'Library_1' , 'Seek1' , 'Release' )
ENDIF

IF IsControlDefined ( 'SeekButton' , 'Library_1' )
DoMethod ( 'Library_1' , 'SeekButton' , 'Release' )
ENDIF

IF IsControlDefined ( 'Quit' , 'Library_1' )
DoMethod ( 'Library_1' , 'Quit' , 'Release' )
ENDIF

DEFINE BUTTON SeekButton
PARENT Library_1
ROW 400
COL 200
WIDTH 100
HEIGHT 50
PICTURE 'IconSearch.bmp'
ONCLICK { Library_1.Seek1.SetFocus , SeekRecord() }
END BUTTON

DEFINE BUTTON QuitSearch
PARENT Library_1
ROW 400
COL 300
WIDTH 100
HEIGHT 50
PICTURE 'IconExit.bmp'
ONCLICK { 'HideButtons()' , 'RETURN' }
END BUTTON

DEFINE LABEL LABEL_Search
PARENT Library_1
ROW 350
COL 130
VALUE 'Track Title:'
FONTBOLD .T.
END LABEL

@ 350,250 Textbox Seek1 ;
PARENT Library_1 ;
WIDTH 200

RETURN


And then:
PROCEDURE HideButtons

Library_1.SeekButton.Visible := .F.
Library_1.QuitSearch.Visible := .F.
Library_1.Seek1.Release

RETURN


While you're looking at this code, perhaps I can ask you a question I've posted elsewhere becaue it relates to this code as well. Is it possible to centre the text under the image in the Toolbar button? At present the text is lower and right of the icon.

Regards,
Alan
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Partial clear screen

Post by Rathinagiri »

Code: Select all


ONCLICK { 'HideButtons()' , 'RETURN' }

By this code, you are passing only an array and not procedure.

You have to enter like this.

Code: Select all

onclick HideButtons()
'Return' is not required.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Partial clear screen

Post by Rathinagiri »

I request you to go through this topic also.

viewtopic.php?f=6&t=3905
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
asharpham
Posts: 55
Joined: Sat Mar 24, 2018 2:48 pm
DBs Used: DBF

Re: Partial clear screen

Post by asharpham »

This has been very informative, Rathingiri. Thank you again.
User avatar
tonton2
Posts: 444
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Contact:

Re: Partial clear screen

Post by tonton2 »

Bonjour tout le monde ,
je ne sais pas pourquoi la fonction "VISIBLE" ne fonctionne pas dans cet exemple ,alors que la fonction "ENABLED" fonctionne normallement.
merci beaucoup pour votre aide
traduction google
Hello everyone ,
I do not know why the "VISIBLE" function does not work in this example, while the "ENABLED" function works normally.
thank's all
Attachments
MENU_Dynamic_Demo.rar
(10.83 KiB) Downloaded 194 times
L'Algerie vous salut
Y.TABET
Post Reply