Updated FormExDestop and ControlsExDesktop libraries

agraham

Expert
Licensed User
Longtime User
ControlsExDesktop version 1.5 posted with source for merging and updated help.

Added ShowItemToolTips for ToolStrip and StatusStrip
Added ToolTipText for other ToolStrip controls
Added Clear Count, Insert, Item and RemoveAt for ComboBox
Added Clear Count, Insert, and RemoveAt for DropDownButton


Does there also exist the Left property, I didn't see it in the MS documentation ?
No, there isn't one as the controls are laid out automatically.
 

agraham

Expert
Licensed User
Longtime User
tspComboBox.Item(2)="New item" .
There's a technical reason why a library can't have an indexed property that is both settable and gettable. The short reason is that the compiler/interpreter of your source code knows what to do when it comes across such code, but as a library is precompiled it needs a separate mechanism for each direction of access for your code to choose at runtime.

I could do a SetItem(index) method but how often would you need it? You can always do a RemoveAt(index) and Insert(thing, index) to get the same effect.
 

klaus

Expert
Licensed User
Longtime User
Thank you for the explanations.

In the meantime I used RemoveAt and Insert to replace the Item method.

Just one thing, in the help file, the first parameter is index and the second value like in the standard Combobox, but in the method the first one is value and the second is index, the two parameters are inverted.

Best regards.
 

klaus

Expert
Licensed User
Longtime User
I am coming back to your question.
I could do a SetItem(index) method but how often would you need it?
I was thinking back to VB1 when I bagan using ComboBoxes and ListBoxes.
I regulary used the Item change method to update item values.
I use the Item return method (the Text method in VB6) only with the selected index, this is the only way to get the selecte item's value.
But with the ToolStripCombobox we have the SelectedItem parameter for that.
In conclusion for the ToolStripCombobox, I would use the Item change (SetItem) method, but I will probably never use the Item return method.

Best regards.
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Hi Andrew,

It's me once again.

I have implemented the ToolStrip objects in my program.

There remains a small aesthetic issue. If you look at the image below you see that there remains a background color in the images in the buttons when they are selected or checked. I looked in the MS documentation and saw that there exists an ImageTransparentColor parameter for ToolStripItems. I tried to set it with different possibilties, but unfortunately without any success.
B4X:
[FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]pen.New1([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]cRed[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[SIZE=2][FONT=Courier New]brush.New1([/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]cRed[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[SIZE=2][FONT=Courier New]tspCalcSum.New1([/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]""[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[SIZE=2][FONT=Courier New]obj1.Value = tspCalcSum.ControlRef[/FONT][/SIZE]
[SIZE=2][FONT=Courier New]obj1.SetProperty([/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"ImageTransparentColor"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]cRed[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[SIZE=2][FONT=Courier New]obj1.SetProperty2([/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"ImageTransparentColor"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],brush.Value)[/SIZE][/FONT]
[/SIZE][/FONT]

What is the solution if there is any ?

Thank you in advance.
 

Attachments

  • ToolStripColors.jpg
    ToolStripColors.jpg
    14.8 KB · Views: 32

agraham

Expert
Licensed User
Longtime User
If you look at the image below you see that there remains a background color in the images in the buttons when they are selected or checked.
I am afraid that I can't see the problem in the screenshot., I don't doubt you are correct, I just don't understand what to look for. Can you post some code so that I can see it properly?
 

klaus

Expert
Licensed User
Longtime User
Here are some more details and the test code.

In Test1.jpg the + button looks normal, I put the background color the same as the ToolStrip background.

In Test2.jpg, it's the state when the mouse cursor enters the button area. You see the original light gray background color besides the + sign branches and a darker background color around. The size of the button image bitmap is the size of the + sign with the light background color. I would like to put this light grey background color beeing transparent to get the darker one also in the + sign.

In Test3.jpg, it's the state with a mouse click down. The darrk grey backgroun around the + sign has become darker. If the button image background color were set to transparent, the + sign would appear in that darker grey color.

I hope this is more clear.

Best regards.
 

Attachments

  • Test1.jpg
    Test1.jpg
    4.9 KB · Views: 18
  • Test2.jpg
    Test2.jpg
    5.2 KB · Views: 15
  • Test3.jpg
    Test3.jpg
    5.2 KB · Views: 17

agraham

Expert
Licensed User
Longtime User
Your backgound grey is a gradient fill so won't work as a transparent colour but if I flood fill the image background with pure red (for example) then this does what you want as long as you set the correct control background colour.

B4X:
obj2.CreateNew("System.Drawing.Color" & obj2.System_Drawing)
obj1.SetProperty2("ImageTransparentColor",obj2.RunMethod2("FromArgb",cRed,"System.Int32"))
For arbitrary colours use
B4X:
obj2.CreateNew("System.Drawing.Color" & obj2.System_Drawing)
col = RGB(255, 0, 0) ' cRed
obj1.SetProperty2("ImageTransparentColor",obj2.RunMethod2("FromArgb",col,"System.Int32"))
 

Zenerdiode

Active Member
Licensed User
Msgbox functionality with a FormEx

I'm just starting to experiment with FormExDesktop 1.6; however I can't get a Message Box to display until I close the FormEx :eek:

I have read the comprehensive help and I don't understand how to invoke a Msgbox. Its not as if its behind the FormEx because its not there when the FormEx is minimised, but again appears if the taskbar button is right-clicked and closed.
 

Attachments

  • FormExTest.sbp
    314 bytes · Views: 25

agraham

Expert
Licensed User
Longtime User
You have missed the significance of this section from the help about the Run method.
IMPORTANT - unlike Show on a normal Form, Run on a FormEx does not return until the application closes so any statements after a Run will only be executed at application close.
 

agraham

Expert
Licensed User
Longtime User
Obj1 is a Door library Object, Args is a Door library ObjectArray
B4X:
Obj1.New1(False)
Obj1.Value = Notifyicon1.ControlRef
Args.New1(4)
Args.SetValue(0, 10, "System.Int32")
Args.SetValue(1, "Title", "System.String")
Args.SetValue(2, "Text", "System.String")
' Icon can be "Error", "Info", "None" or "Warning"
Args.SetValue(3, "Warning", "System.Windows.Forms.ToolTipIcon" & Obj1.System_Windows_Forms)
Obj1.RunMethod4("ShowBalloonTip", Args.Value)
 

Zenerdiode

Active Member
Licensed User
:icon_clap::sign0188:

Thank You! Little snippets like this are also helping me understand the interaction of Door and .Net functions.
 

Byak@

Active Member
Licensed User
Hello Agraham)
i'm try add Tag to CheckBoxEx (with DOOR lib) but have error...
in msdn i'm see this parametr...
 

Byak@

Active Member
Licensed User
hmm...i do doorex.fromstring() and have error.
but now i'm do door.fromcontrol() and all right... why?
 
Top