Jump to content

filtering a listview


Recommended Posts

Sotring Columns is done, not really hard ^^

Looking now for colors, let me know if you have an hint for the rest ...most important is the saving feature (after editing datas) to same .xml file (or at least another sort of file with tabs that can identify the fields).

M.

Edit: Hmm, tried the script at the link you gave me but the LV doesn't change color (not mine but the script demo one). ??

Edited by marko001
Link to comment
Share on other sites

Looking now for colors, let me know if you have an hint for the rest ...most important is the saving feature (after editing datas) to same .xml file (or at least another sort of file with tabs that can identify the fields).

Your question about saving/filtering was complicated to understand for me (I don't know what exactly you want) so I didn't answer.

Edit: Hmm, tried the script at the link you gave me but the LV doesn't change color (not mine but the script demo one). ??

For me it works fine. I use AutoIt 3.2.12.1 on WinXP Edited by Zedna
Link to comment
Share on other sites

I try to explain about filtering:

I have now 2^6 IF-cycles (since I have 6 checkboxes that I can use to cross several datas.

I also added a combo box that, before While cycle, loads his fields as

_populateCombo()
GUICtrlSetData($COMBO_Countries,$combostring)

Combobox fields are populated by

func _populateCombo()
    Local $I, $J, $K, $Txt
    $adoRsItems.MoveFirst()
    $J = $adoRsItems.Fields.Count() - 1
    $Allcountries= _ArrayUnique($countries)
    $combostring = _ArrayToString($Allcountries,"|",2)
EndFunc

and $countries[] is given by:

for cycle
$countries[$k] = $adoRsItems.fields(4).value
next

So Now I have over 30 countries in combobox.

I have in my gui the 6 checkboxes and the combobox.

I want to filter on the combination of the 6 checkboxes AND guictrlread($COMBO_Countries)

Since the combo can have more than 30 values I thought to do something like:

Case $BT_Filter
            $adoRsItems.Filter = _filter()   ; and this one calls the function with 2^6 IFs to get the correct filter based on the @GUI_CHECKED
                   ---> $adoRsItems.Filter2 = "Country = '" & $guictrlread($combo_countries) & "'"  <-----
            _PopulateListView()

But obviously it doesn't work since the 2nd call to filter cancel the 1st one.

:huh2: Saving.

I think I can, in some way, solve it; mainly I need to overwrite the original .xml everytime I change some data. I simply (...) need to reconstruct from the LV the exact structure of the XML and overwrite it. Or there is another way?

c) For colors... I use Win7 64bit and AutoIT 3.3.6.1 and still can't see colors..

Edited by marko001
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...