ScriptSpot home

Forum topic · General Scripting

Image Button without border and without animation to open web adress

By artrender · 2013-02-20

Description

border:false -- doesn't help. It's showing black border and is animating when mouse over - I want it to work like usual images but to open link when pressed

dotNetControl logobtn "Button" pos:[0,0] width:400 height:286 border:false
on testRoll open do (logobtn.image = (StringToImage img_logo))

on logobtn click do
(
HyperLink Hypl_homepage "homepage" pos:[50,320] width:65 height:15 address:"www.google.com"
)

Comments (10)
artrender

SOLVED!!!! Thx boys!

I've come up with this and it's working great!



dotNetControl logobtn "System.Windows.Forms.Label" pos:[0,0] width:400 height:286
on testRoll open do (logobtn.image = (StringToImage img_logo))
on logobtn click do  --pressed do 
	(
        	ShellLaunch @"http://www.scriptspot.com"  ""
	)

Reply to artrender
Panayot Karabakalov

solved?...

What about border and animation of the button? At least this is the actual question in your title.

Take a look at

imgTag

ui control.

Cheers!

Reply to Panayot Karabakalov
Branko Živković

Yep. That is best mxs solution but he start with dotnet button controll, and end up with dotnet label ctrl. I guess that's OK.

srry, but I don't understand

What code would you use? I'm new in max scripting but I'm an old max user, and I want to simplify things that I'm repeating for years! That's why I started to learn maxscript! But I APPRECIATE your time that you consume to help others! You are a big BLESSING for new scripters!

Reply to artrender
Branko Živković

If you ask me, i combine .net and mxs in most cases. But in your case i not see the reason why not use imgTag ctrl. .net is for more complicated tasks only (when standard mxs ctrl not get you right solution).
That's my opinion.

Reply to artrender
Panayot Karabakalov

well... :)

Your main question was about visual behaviour of your button, not about it action (what happen when its clicked), and I not see how you solved your main query, for that I ask ;-)

Usually, buttons or other interactive controls using icons to represent there state like when selected (get focus), pressed, checked, disabled, etc. And all this is made with meaning to help as know that the control react to us.

I have the feeling you need a "button" without such visual changes, therefore I thought about using ImgTag.

So, am was just curious how you solve this.

Reply to Panayot Karabakalov
Branko Živković

Hey Panayot i send you PM about your previous question. devX ctrl produce best visual style but also slowest one

:)

Reply to Branko Živković
Panayot Karabakalov

thanks

But I'm still stubborn donkey anchored to Max 2009 :lol:
Can I test somehow DevX on my shack?

miauu

This will open the scriptspot web page with the default browser.



on btn_openWebPage pressed do
(
	ShellLaunch @"http://www.scriptspot.com"  ""
)
Branko Živković

u can use dotnet label