Solved

how to put hyperlinks in a grid(flex/hflexgrid)?

Posted on 2004-10-07
3
346 Views
Last Modified: 2008-01-09
Is there any way to how to put hyperlinks in a grid(flex/hflexgrid)?
0
Comment
Question by:sonashish
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 12246408
Try customize below, example using MSFlexGrid:

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Public Function StartDoc(ByVal FileName As String, Optional CommandLine As String = "") As Long
    StartDoc = ShellExecute(0&, "Open", FileName, CommandLine, vbNullString, 1)
End Function

Private Sub Form_Load()
    MSFlexGrid1.Cols = 3
    MSFlexGrid1.Rows = 5
    MSFlexGrid1.FixedCols = 1
    MSFlexGrid1.FixedRows = 1
   
    For i = 1 To 4
        MSFlexGrid1.TextMatrix(i, 1) = "Item " & i
        MSFlexGrid1.Row = i
        MSFlexGrid1.col = 2
        MSFlexGrid1.CellForeColor = vbBlue
        MSFlexGrid1.CellFontUnderline = True
    Next i
   
    MSFlexGrid1.ColWidth(1) = 1000
    MSFlexGrid1.ColWidth(2) = 2500
   
    MSFlexGrid1.TextMatrix(1, 2) = "http://www.yahoo.com"
    MSFlexGrid1.TextMatrix(2, 2) = "http://www.google.com"
    MSFlexGrid1.TextMatrix(3, 2) = "http://www.experts-exchange.com"
    MSFlexGrid1.TextMatrix(4, 2) = "http://www.download.com"
   
End Sub

Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    If MSFlexGrid1.col = 2 Then
        StartDoc MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, MSFlexGrid1.col)
    End If
End Sub
0
 
LVL 2

Author Comment

by:sonashish
ID: 12256130
ryancys

This is an excellent solution. I am giving you full point.

Just for FYI, following I need to mention in a module(nas file)

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Everything is working perfectly, as I am looking for.
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 12256135
Sure and glad could make help here, cheers 8-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question