Page 1 of 1

HyperLinkGadget flags

Posted: Thu Nov 10, 2011 4:40 am
by MachineCode
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.

Re: HyperLinkGadget flags

Posted: Thu Nov 10, 2011 7:06 am
by IdeasVacuum
...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?

Re: HyperLinkGadget flags

Posted: Thu Nov 10, 2011 7:15 am
by MachineCode
But then it's not blue when hovered and no hand icon appears. :)

Re: HyperLinkGadget flags

Posted: Thu Nov 10, 2011 7:23 am
by nco2k
+1

c ya,
nco2k

Re: HyperLinkGadget flags

Posted: Thu Nov 10, 2011 7:28 am
by IdeasVacuum
But then it's not blue when hovered and no hand icon appears.
...easy enough to do that too, but of course an enhancement is the best solution.

Re: HyperLinkGadget flags

Posted: Thu Nov 10, 2011 7:49 am
by MachineCode
IdeasVacuum wrote:easy enough to do that too
But not easier than just resizing the gadget. ;)

Re: HyperLinkGadget flags

Posted: Thu Nov 10, 2011 7:54 am
by IdeasVacuum
...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.

Re: HyperLinkGadget flags

Posted: Thu Nov 10, 2011 8:00 am
by MachineCode
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.

Re: HyperLinkGadget flags

Posted: Thu Nov 10, 2011 8:12 am
by nco2k
@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

Re: HyperLinkGadget flags

Posted: Fri Nov 11, 2011 5:45 pm
by IdeasVacuum
...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 :)

Re: HyperLinkGadget flags

Posted: Fri Nov 11, 2011 7:34 pm
by Zach
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