Partial clear screen

Moderator: Rathinagiri

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

Re: Partial clear screen

Post by asharpham » Fri Apr 06, 2018 11:08 am

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: 5255
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 167 times
Been thanked: 167 times
Contact:

Post by Rathinagiri » Fri Apr 06, 2018 1:59 pm

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: 5255
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 167 times
Been thanked: 167 times
Contact:

Post by Rathinagiri » Fri Apr 06, 2018 2:53 pm

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
Has thanked: 14 times

Post by asharpham » Sat Apr 07, 2018 4:47 am

This has been very informative, Rathingiri. Thank you again.

User avatar
tonton2
Posts: 290
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Has thanked: 7 times
Been thanked: 10 times
Contact:

Post by tonton2 » Sat Jan 19, 2019 11:19 am

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 15 times
L'Algerie vous salut
Y.TABET

Post Reply