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
Partial clear screen
Moderator: Rathinagiri
- 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
Code: Select all
ONCLICK { 'HideButtons()' , 'RETURN' }
You have to enter like this.
Code: Select all
onclick HideButtons()
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- 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
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Partial clear screen
This has been very informative, Rathingiri. Thank you again.
Re: Partial clear screen
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
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 205 times
L'Algerie vous salut
Y.TABET
Y.TABET