ScriptSpot

Forum topic · General Scripting

Image Button without border and without animation to open web adress

By artrender.info · 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)

SOLVED!!!! Thx boys!

artrender.info · 2013-02-20

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"  ""
	)

solved?...

Anubis · 2013-02-21

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!

barigazy · 2013-02-21

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

artrender.info · 2013-02-21

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!

barigazy · 2013-02-21

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.

well... :)

Anubis · 2013-02-21

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.

barigazy · 2013-02-21

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

:)

thanks

Anubis · 2013-02-22

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

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

miauu · 2013-02-20



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

barigazy · 2013-02-20

u can use dotnet label