[Closed] Is it possible to tweak the Status Bar somehow?
I am specifically interested whether it is possible or not, to add an icon next to the isolate button in the Status Bar through script or some other way.
Anyone who might know a solution?
you have to understand that is a ‘hacker’s’ way. there is noting built-in to support it in the mxs. so it’s a hack
If you don’t need anything fancy, a very simple way of doing it could be this:
(
try destroydialog ::RO_BT catch()
rollout RO_BT "" width:29 height:23
(
groupbox d0 "" pos:[0,-5] width:1 height:27
checkbutton bt "[A]" pos:[4,0] width:23 height:22 border:false highlightcolor:orange
on bt changed arg do print arg
)
GetID = UIAccessor.GetWindowResourceID
for i in (windows.getChildrenHWND #max) where i[4] == "StatusPanel" do
(
for j in (windows.getChildrenHWND i[1]) where j[4] == "CustToolbar" do
(
for k in (windows.getChildrenHWND j[1]) where (GetID k[1]) == 197 do
(
iso = windows.getwindowpos k[1]
createdialog RO_BT pos:[iso.x-31,iso.y] style:#()
)
)
)
)
It should work on Max 2014+
Note that it does not handles the windows resizing/moving, but you could add that.
If you need it to be more professional, then you may need to go with a more cumbersome solution of injecting controls and hooks.
the space after “Isolate Selection” is taken by “Selection Lock”.
is there any better place, or you ready to overlap?
actually there is a little space between Z-position Value and Grid value
that is the real problem.
if we scale the difficulty of this task from 0 to 10: to add a button == 3, to add an icon button == 4, to support moving it with its parent resizing == 8
Yes, resizing is the hardest one to hook in this case. You need to deal with a lot of messages, and there is no warranty about stability.
You have no access to the source code, so you can’t be really sure of what is going on. There can be custom messages sent to the UI controls, and it is really easy to mess things up and crash the host application.
Jorge is right. if we want to add mxs button it’s only way to add it with its own rollout. (using sdk it’s possible to do it without extra rollout). but we are talking about mxs
there is another solution – make a .net form button that looks like native mxs. in this case we don’t need extra rollout. but in this case we have to support “scheme changed’ event, which is supported automatically by using built-in a mxs control (button as well)