Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 1 Jahr, 2 Monaten
Letzter Beitrag:
vor 1 Jahr, 2 Monaten
Beteiligte Autoren:
Peter Muckle, DarrenF, Arie

WM20 Android : image size in looper break headers

Startbeitrag von Peter Muckle am 03.01.2017 20:23

Hi All,

I have a looper with two breaks. The default plus/minus image is 12x12 pixels and I want to make it 36x36, and use +/- rather than small arrows. Is this possible, and does anyone know a way to do this please?

The other thing I would like to do is to expand/collapse a break by tapping anywhere on the break header, if anyone has this working I'd be grateful for some advice.




Hi Peter,

Yes, I had this same issue about a year ago (http://27130.foren.mysnip.de/read.php?27131,544475,544854#msg-544854)

Sorry to say, I couldn't fix it :sneg:

It seems to be better in WM21, because re-generating the app made the icon bigger without me changing anything in the project, so (as I say in my previous post), it's as though the icon is "hard-coded" once you generate the app for Android.

von DarrenF - am 04.01.2017 08:57
Thanks Darren

The 12x12 pixel icon makes the whole thing really awkward to use! Maybe it is time to upgrade from 20.

I added a big transparent button to the header area and am trying to get it to work with programming.

In the help file, it says to use LooperCollapseExpand (my bolds):

LooperCollapseExpand( [, [, ]])

: Character string (with or without quotes)
Name of the Looper control to use.
If this parameter is equal to an empty string (""), the current Looper control is used.

: Optional integer
Number of the row to collapse or expand.
The current row is used if this parameter is not specified.

: Optional character string (with or without quotes)
Name of the break to modify. This parameter must be specified in case of nested breaks. It is used to define the break that will be handled. By default, no break is expanded or collapsed if the breaks are nested.

I can't work out how to find the current Row Number (in WM20) and do not know how to pass an empty parameter while following with the Break Name.


Thanks for any ideas


von Peter Muckle - am 04.01.2017 10:01
Hi Pete,

Yeah, I tried loads of things... and had to admit defeat in the end.

I could see my graphic icon in GO test mode but as soon as the app was deployed onto the device the graphic is tiny again. I even created my own 2-state coloured icon and tried with that; you can tell something's not quite right 'cos the graphic at design time and the graphic on the device are different!

Anyhow, I said it's better in WM21, and I say "better" 'cos it's not totally fixed; it still replaces my graphic with it's own in WM21, but at least it's bigger!

It seems like a big cost to upgrade to WM21 just to get a bigger icon? ...unless it's a show stopper? Obviously, with the next release, you do get more features, plus PCS tend to "tighten things up" and fix a lot of niggly bugs.

As I always say, any dev product that relies on external frameworks (like Eclipse), you're always at the mercy of either the framework author or the company supplying the dev tool to keep it in-line with the framework.

Get row number using the LooperSelect function.
Empty parameters are normally passed using NULL, although never tried it in the way you're trying to use it.


von DarrenF - am 04.01.2017 10:33
Thanks Darren,

The looper is to make the app faster and easier to use, but the tiny icon is fiddly and sometime has to be tapped 3 or 4 times to open the break, which defeats the purpose. Some of my users have fat fingers and would quickly get frustrated. Otherwise the looper is pretty good, apart from the first row sometimes not filling in..

Any ideas how to enter a null parameter here??

Just leaving a blank, or two commas ,, doesn't work, neither does the word Null.


I've tried retrieving the row number but LooperRecNum doesn't work in Android yet. Is there another way to get the row number of the break header?

Thanks again


von Peter Muckle - am 04.01.2017 11:23

Yep, I must have fat fingers as well! ;) WM21 is definitely better with regards to the size of the icon. As a last resort, I did think about the possibility of Eclipse having some kind of setting for icons, but I know even less about the inner workings of Eclipse!

LooperCollapseExpand expects a numeric value in that position. I was going to suggest using a variable and set it to NULL, but I think it will just pass a null numeric as 0?

Why not try the LooperInfoXY function to get the row number? The Help say it's available in Android and it should give you the row number of the looper where the user is prodding the screen and it also gives a bit of example code using the MouseXPos/MouseYPos functions (both of which are also available in Android - result!); http://help.windev.com/en-US/?3083022&name=looperinfoxy_function

Give it a go - I've got my reasonably fat fingers crossed for you! ;)

von DarrenF - am 04.01.2017 11:52
Thanks again Darren,

Yes, I tried setting a variable to Null and it didn't work.

I put this code on a button on the first Break Header, but it returned '1' whichever header was tapped. The simulator then crashed when closing the app, something that has happened with everything I've tried so far.

x is int = MouseXPos()
y is int = MouseYPos()
nRow is int = LooperInfoXY(LOOP_Looper1, liLineNumber, x, y)
Trace("You've clicked the row: " + nRow)



von Peter Muckle - am 04.01.2017 12:11
Try putting the code in the Row Select code section of the looper. Also use ToastDisplay instead of Trace.

von DarrenF - am 04.01.2017 12:21
Thanks. That gives me the row number for the looper (data) rows, but the number for the first looper row is 1, which below 2 nested break headers, so maybe they are minus numbers?.

von Peter Muckle - am 04.01.2017 13:08
Hi Pete,

There's some info on handling break subscripts here: http://help.windev.com/en-US/?1013287, the LooperBreakSubscript function might help?

von DarrenF - am 04.01.2017 13:53

afaik the breaks do not have a rownumber of their own. They belong to a normal row of the looper, which is the number 1 you see now I suppose.

Without knowing your exact needs (mabe you can post a screenshot?) : another approach is to add a small button to the looper and use that to exapnd/collapse. It maybe a bit less user friendly. But it solves your image problem also.

von Arie - am 04.01.2017 14:42
Hi Arie,

Yes, I am now trying to add a button to use for expand/collapse to the break header, but the first break expands whichever break is selected. Ideally I'd add a transparent button over the whole header area.

Thanks again


von Peter Muckle - am 04.01.2017 16:37
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.