Updated FormExDestop and ControlsExDesktop libraries

BPak

Active Member
Licensed User
Longtime User
List View Colors

Hi Andrew

I have been looking at your List View and experimenting with the different functions.

B4X:
            lv1.SetItemBackColor(index, cRed)
            lv1.SetItemForeColor(index, cYellow)

This puts color for the whole Row.

Is there any way of putting color for individuals (item and sub-items)?

Also there is:
SetColumnAlignment
SetColumnWidth
SetColumnTitle

Is there a way of SetColumnBackColor for the whole Column?


Setting the FontSize: Int32 [I/O]

lv1.FontSize = 12 changes the Header font size. Is there a way of setting the LV font size?
 

aroom

Member
Licensed User
thanks, agraham. I use MainMenu, run is ok in IDE, but compile error:
Error CS0118: "MainMenu" is namespace, but use as class.

B4X:
FormEx3.New2("Form3","MDI parent",600,600)
   myMainmenu.NewMainMenu
      popMenuItem.NewMenuItem("test1", True, False, False, True) 
      popMenuItem.NewMenuItem("test2", True, False, False, True)
   myMainmenu.AddMainMenu(Formex3.ControlRef)

please give more advice, thanks.
 

agraham

Expert
Licensed User
Longtime User
You don't give me the full source code so I can't reproduce your error but that fragment is incorrect. You are not adding the menu items to the main menu.

B4X:
Sub App_Start
   FormEx1.New2("Form1","MDI parent",600,600)
   myMainMenu.New1(10)
   popMenuItem.New1
   myMainmenu.NewMainMenu
      popMenuItem.NewMenuItem("test1", True, False, False, True) 
      myMainMenu.AddMenuItem(popMenuItem.ControlRef)
      popMenuItem.NewMenuItem("test2", True, False, False, True)
      myMainMenu.AddMenuItem(popMenuItem.ControlRef)
   myMainmenu.AddMainMenu(Formex1.ControlRef)   
   FormEx1.Run
End Sub
 

aroom

Member
Licensed User
afer delete FormExDesktop.cs, compile is ok.
perhaps FormExDesktop.cs and MainMenu.cs two files conflict.
 

agraham

Expert
Licensed User
Longtime User
How to change ToolStripTextBox width?
There is a bug in ToolStripTextBox that ignores the Width property which is why it is not present in the library. I later found a workaround you can do with the Door library. Obj1 and Obj2 are Door library Objects.
B4X:
   TSTextBox1.New1("TextBox")
   Obj1.New1(False)
   Obj2.New1(False)
   Obj1.Value = TSTextBox1.ControlRef
   Obj2.Value = Obj1.GetProperty("Size")   
   Obj2.SetProperty("Width", 180)
   Obj1.SetProperty2("Size", Obj2.Value)
 

agraham

Expert
Licensed User
Longtime User
ControlsExDesktop version 1.8 now posted has OpenDialogEx and SaveDialogEx file dialogs that offer more capability than OpenDialog and SaveDialog in Basic4ppc. In particular the initial path that is opened when the dialog is shown can be set by the Path property.

Also I have added a Width property to ToolStripTextBox.
 
Top