One of the attendees in yesterday's class asked me if you could put a clickable URL into a browse. I said "yes" but didn't find the solution right away and had to move on.
I figured one way to do it, so here it is:
Let's assume the table has a field called "Company_URL" that you include in the browse, and that it's fully-qualified, e.g. "http://www.alphasoftware.com" (without the quotes).
Edit the browse column Display Format.
Add a button to the Selected Controls list, label and design the button however you wish.
Now, go to the Browse Events / Events and you'll find some code like this:
All you need to do is add one line to this code:
Now I just hope someone finds this useful.
I figured one way to do it, so here it is:
Let's assume the table has a field called "Company_URL" that you include in the browse, and that it's fully-qualified, e.g. "http://www.alphasoftware.com" (without the quotes).
Edit the browse column Display Format.
Add a button to the Selected Controls list, label and design the button however you wish.
Now, go to the Browse Events / Events and you'll find some code like this:
Code:
FUNCTION COMPANY_URL_ButtonClick AS V ( event AS C, data AS C , row AS N ) 'DESCRIPTION: Fired when a button is clicked on a column. 'Arguments: event - the name of the event that is fired ' data - the data in the column cell ' row - the row number in the browse 'this.SetViewport_Row() sets the current row to the row with the button that was clicked. this.Set_Viewport_row(row) END FUNCTION
Code:
FUNCTION COMPANY_URL_ButtonClick AS V ( event AS C, data AS C , row AS N ) 'DESCRIPTION: Fired when a button is clicked on a column. 'Arguments: event - the name of the event that is fired ' data - the data in the column cell ' row - the row number in the browse 'this.SetViewport_Row() sets the current row to the row with the button that was clicked. this.Set_Viewport_row(row) [B][COLOR="Red"]sys_open(data)[/COLOR][/B] END FUNCTION
Comment