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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

:)

Look better for propertie name and value which is boolean (true-false or on-off)

BitmapLister.FLP.WrapContents = off

Not try this never again it's funny

BitmapLister.FLP.WrapContent=BitmapLister.FLP.WrapContent.false

barigazy

artrender.info's picture

srry

there is

artrender.info's picture

There is no FlowDirection property inside FlowLayoutPanel

showproperties BitmapLister.FLP

.AccessibilityObject : , read-only
.AccessibleDefaultActionDescription :
.AccessibleDescription :
.AccessibleName :
.AccessibleRole :
.AllowDrop :
.Anchor :
.AutoScroll :
.AutoScrollMargin :
.AutoScrollMinSize :
.AutoScrollOffset :
.AutoScrollPosition :
.AutoSize :
.AutoSizeMode :
.BackColor :
.BackgroundImage :
.BackgroundImageLayout :
.BindingContext :
.BorderStyle :
.Bottom : , read-only
.Bounds :
.CanFocus : , read-only
.CanSelect : , read-only
.Capture :
.CausesValidation :
.CheckForIllegalCrossThreadCalls : , static
.ClientRectangle : , read-only
.ClientSize :
.CompanyName : , read-only
.Container : , read-only
.ContainsFocus : , read-only
.ContextMenu :
.ContextMenuStrip :
.Controls : , read-only
.Created : , read-only
.Cursor :
.DataBindings : , read-only
.DefaultBackColor : , read-only, static
.DefaultFont : , read-only, static
.DefaultForeColor : , read-only, static
.DisplayRectangle : , read-only
.Disposing : , read-only
.Dock :
.DockPadding : , read-only
.Enabled :
.FlowDirection :
.Focused : , read-only
.Font :
.ForeColor :
.Handle : , read-only
.HasChildren : , read-only
.Height :
.HorizontalScroll : , read-only
.ImeMode :
.InvokeRequired : , read-only
.IsAccessible :
.IsDisposed : , read-only
.IsHandleCreated : , read-only
.IsMirrored : , read-only
.LayoutEngine : , read-only
.Left :
.Location :
.Margin :
.MaximumSize :
.MinimumSize :
.ModifierKeys : , read-only, static
.MouseButtons : , read-only, static
.MousePosition : , read-only, static
.Name :
.Padding :
.Parent :
.PreferredSize : , read-only
.ProductName : , read-only
.ProductVersion : , read-only
.RecreatingHandle : , read-only
.Region :
.Right : , read-only
.RightToLeft :
.Site :
.Size :
.TabIndex :
.TabStop :
.Tag :
.Text :
.Top :
.TopLevelControl : , read-only
.UseWaitCursor :
.VerticalScroll : , read-only
.Visible :
.Width :
.WindowTarget :
.WrapContents :

artrender.info's picture

even

BitmapLister.FLP.FlowDirection.BottomUp

doesn't change anything!
I think I'm doing smth wrong!

barigazy's picture

...

I not know what's wrong, but let consider this:
-- what if you have over the 1000 bitmaps or material. That will kill your tool.
Maybe is a bad idea to use numbering of maps group.
-- if you deside to continue with this then try to create two separate vertical FLP one for the material class and one for numbers.

barigazy

artrender.info's picture

hm

BitmapLister.FLP.FlowDirection=(dotNetObject "System.Windows.Forms.FlowDirection" LeftToRight)
 
and 
 
BitmapLister.FLP.FlowDirection=(dotNetObject "System.Windows.Forms.FlowDirection" TopDown)

also doesn't help - the same result

artrender.info's picture
artrender.info's picture

look

I noticed that whatever I use

BitmapLister.FLP.FlowDirection.TopDown
or
BitmapLister.FLP.FlowDirection.LeftToRight

it does not change at all! I think I'm not writing code corectly

barigazy's picture

...

Not change because your FLP with is too small and not allow to cange position of controls. I love to use Panel because I can manualy assigne exact location of .net control. But if your controls change size then FLP is the better choise

barigazy

artrender.info's picture

BitmapLister.FLP.FlowDirectio

BitmapLister.FLP.FlowDirection.LeftToRight 

does not help also! exactly the same result! May be smth I do wrong!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.