HyperLinkGadget flags
-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
HyperLinkGadget flags
Could the HyperLinkGadget be made to support #PB_Text_Center and #PB_Text_Right, like a TextGadget? The reason is that I need to have my gadget flush with the right-hand edge of my window, but its size changes depending on the text it holds, so I need to manually keep changing its position to fit the text. If it supported #PB_Text_Right, then I wouldn't have to worry.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: HyperLinkGadget flags
...as a work-around you can just use a right-justified text gadget instead and detect a mouse click in that region of the window, or indeed use a flat non-bordered read-only string gadget and detect a click event on that. Or how about a button?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: HyperLinkGadget flags
But then it's not blue when hovered and no hand icon appears. 

Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: HyperLinkGadget flags
...easy enough to do that too, but of course an enhancement is the best solution.But then it's not blue when hovered and no hand icon appears.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: HyperLinkGadget flags
But not easier than just resizing the gadget.IdeasVacuum wrote:easy enough to do that too

Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: HyperLinkGadget flags
...does it absolutely have to display the full URL? If you can just use a generic label, you know, 'go to website' or whatever, then you do not have to worry about size and location.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: HyperLinkGadget flags
It displays one of several messages, actually. "Buy Now", "Upgrade", and "Not currently connected". The gadget is at the bottom-right of my app's window, and I want each message to end about 5 pixels left of the window edge. With a TextGadget, you just set the #PB_Text_Right flag and it's done, but this doesn't work with the HyperLinkGadget, so I have to do a Select/Case for each message and reposition it accordingly.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
Re: HyperLinkGadget flags
@IdeasVacuum
dont forget that different os versions have different fonts and there is always the possibility, that a user has changed the system font. a flag for automatically taking care of the alignment, would be of great help.
c ya,
nco2k
dont forget that different os versions have different fonts and there is always the possibility, that a user has changed the system font. a flag for automatically taking care of the alignment, would be of great help.
c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: HyperLinkGadget flags
...yup, I didn't forget, I agree that the enhancement would be a good one, just trying to help out with possible work arounds while we wait for it 

IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Addict
- Posts: 1675
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: HyperLinkGadget flags
Couldn't you mimic this behavior in a read-only Editor Gadget?
send it an RTF formatted string, for a hyperlink and then right-align it
send it an RTF formatted string, for a hyperlink and then right-align it