Re: Partial clear screen
Posted: 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
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