create dotnetcontrol buttons inside function
I want to create buttons depending on certain things!
So here is what I need:
fn myfunction= ( ... for i=1 to IDcount do ( dotnetcontrol ID_btn[i] "System.Windows.Forms.Button" width:20 height:60 pos:[27,i*153] ID_btn[i].backcolor = (dotnetcolor 70 70 70) ID_btn[i].flatstyle = dotnetobject "System.Windows.Forms.FlatStyle" Flat ID_btn[i].text="1" ID_btn[i].foreColor = (dotnetcolor 200 200 200) ) )
How to make it work?
Comments
Thx Barigazy!
I use this
How to find out which s.material is used for certain button? and how to find out is this button ID btn or material?
I will use "Tag" property of
I will use "Tag" property of dotnet object in this case button.
Simply put some information lat say materilal in button tag prop
btn1.tag = s.material.name
then use findItem method for btnarray or
bga
FINALLLY I've got it work! THANK YOUUUUUU!
But one more question!
If I add btns in dotnet panel
then how to use them?
on --<<>>??? click do
(
)
I post already my write
I post already my write method.
You need to predefine locals fo button objects.
Then you nedd to define events for this buttons. Let's say you have:
on btn click arg do ... you can use only if button is dotNetControl but not dotNetObject. In mxs help you can find topics about dotNet definition
bga
This is what I came up with
Now I can easily go on! Thank you, Barigazy! You HELPED me lot!!!
oh
ok! Thx! I will try now
My suggestion is to use
My suggestion is to use "Form" instead of Rollout because you use dotnet objects.
This is the way how I write my tools, is not the perfect aproch but works for me.
bga
how
sp.panel1.width = 15
?
just tell me
how to define the width of the containers and if I can use just one container then let me know how to fill pn with one container. Everything else I understood how to do!
Except this
I thought to draw all buttons like you showed me in this function:
Here it is possible to put location and dimensions! In fact I need only one container where I could add buttons!
Is it possible to define just one container where I could add these buttons, or should I make a thin column on the left and one wider on the right where I could add all the buttons?