You are not logged in.

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

21

Tuesday, October 15th 2013, 8:33pm

I don't see a problem with the CheckBox or do you mean the ComboBox?
Yes, I meant the ComboBox. Sorry. :whistling:

Greatings
theuserbl

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

22

Tuesday, October 15th 2013, 8:39pm

I would rather change FileListBox:

Jabaco Source

1
2
3
4
5
Public Sub Class_Initialize()
  myDirectory = CurDir
  Base.BackColorAlternating = Base.BackColor   ' <=== this is the new line
  Update_Filename_List()
End Sub


We could add Property BackColorAlternating to FileListBox too!?


Hmm.. possible.
But I think, it would be better to change the ListBox for that.
Because I think it is better, if classes, which have ListBox as superclass don't need so much changes.
If there comes a new control, which have ListBox as superclass, it needs the same changes, too.
So I think, it would be better in ListBox.

(weiß wieder nicht, was ableiten auf englisch heißt. Und was man zu abgeleiteten Klassen sagt. Also sage ich ständig, Klassen, die ListBox als SuperClass haben, statt Klassen, die von ListBox abgeleitet sind)

Greatings
theuserbl

Dani

Intermediate

  • "Dani" started this thread

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

23

Tuesday, October 15th 2013, 8:54pm

...[derived class]

Yes, but if we have it within ListBox only, we would have to make it accessible from each control anyway so we can have different colorsettings for every control. Or how would you do that?
Isn't it just another property like Font or ForeColor?

Dani

Dani

Intermediate

  • "Dani" started this thread

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

24

Tuesday, October 15th 2013, 9:03pm

...got to go for today ...

back tomorrow!?



Dani

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

25

Tuesday, October 15th 2013, 9:36pm

...[derived class]
Ahhh, thanks. :)


I think you are right. It is better to implement it in FileListBox.


I tried it all out.

Without modifications, FileListBox have black lines.

With
myBackColorAlternating = Me.BackColor
in Class_Initialize() of ListBox, the FileListBox have no longer black lines.

But adding in uDirBrowse in CreateFile1() before Me.add(File1) an
File1.BackColorAlternating = RGB(200,200,200)
then, there are light gray lines.

So I thought, that FileListBox direved all default values from ListBox.


Quoted

Isn't it just another property like Font or ForeColor?


Right.
So I have changed in the XML file the colors for the BackColor and ForeColor.
Creating a new Form, so that the colorsa of the XML file are used.


And then tried this here:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Public Sub Form_Load()
   For i=1 To 10
     List1.AddItem i
   Next i

   Dim file1 As New FileListBox   
   file1.Top = 50
   file1.Left = 70
   file1.Height = 200
   file1.Width = 300
   file1.Visible = True
   file1.BorderStyle = fmBorderStyleSingle
   file1.CanGetFocus = True
   file1.Enabled = True
   file1.FixedCellHeight = -1
   file1.FixedCellWidth = -1
   file1.FontBold = False
   file1.FontItalic = False
   file1.FontName = Arial
   file1.FontSize = 9
   file1.MousePointer = vbDefault
   file1.Orientation = lstOrientationVertical
   file1.Style = vbListBoxStandard
   file1.MouseIcon = Nothing
   file1.Hidden = True
   Me.add(file1)
End Sub


Resut:
LiostBox have new color for the font and the BackColor, FileListBox have not.


Greatings
theuserbl

Rate this thread
WoltLab Burning Board