View Full Version : UI_IMAGECTX Module question
catventure
05-02-2009, 22:49
Hi,
My question is simply how to clear/remove a loaded graphic from the UI_IMAGECTX control?
Thanks,
catventure.
ErosOlmi
05-02-2009, 23:12
:oops: oops ... there is no way at the moment. I have to check how to do it.
In the meantime I can suggest 2 tricks:
use a dummy 1 pixel image of the same color of the background color you want to give to your IMAGECTX control
kill with CONTROL KILL ... statement and create it again on the fly
I will give you back if I find a way to clear current image.
Ciao
Eros
ErosOlmi
06-02-2009, 00:10
Ok,
I've added a new function:
UI_IMAGECTX_ClearImage hWnd, CtrlID, Redraw
where Redraw can be %TRUE or %FALSE
Will be present in next release but ... if you wnat to test it, get attached UI_IMAGECTX module and copy it into your \thinBasic\Lib\ directory and replace your current one.
Let me know.
Eros
catventure
06-02-2009, 00:47
I've added a new function:
UI_IMAGECTX_ClearImage hWnd, CtrlID, Redraw
where Redraw can be %TRUE or %FALSE
Will be present in next release but ... if you wnat to test it, get attached UI_IMAGECTX module and copy it into your \thinBasic\Lib\ directory and replace your current one.
Whew that was fast! Yep. I tried it and seems the new function works well.
Best regards,
catventure.
catventure
06-02-2009, 14:22
Hi,
CONTROL ADD UI_IMAGECTX, hdlg, %ID_LISTVIEW, "", 155, 10, 195, 135
Is it possible to add styles and ex_styles to the control like it says in help file?
hndl = CONTROL ADD UI_IMAGECTX, hwnd, ctrlID, txt, xPos, yPos, Width, Height [, [Style] [, [ExStyle]]]
EG: I just wanted to make a border/edge
CONTROL ADD UI_IMAGECTX, hdlg, %ID_LISTVIEW, "", 155, 10, 195, 135, %ws_border
but then subsequent loaded graphic did not show up in control...
Thanks,
catventure
ErosOlmi
06-02-2009, 15:22
Yes, sure it is possible but if you indicate something you will loose default values so you need to indicate all styles by your own.
Default one in case of this control are: %WS_CHILD or %WS_VISIBLE (my fault: it is not mentioned in help file)
If you want do add also %WS_BORDER you need to indicate them all: %WS_CHILD or %WS_VISIBLE or %WS_BORDER
otherwise it will not be %WS_CHILD and %WS_VISIBLE
Ciao
Eros
catventure
06-02-2009, 17:48
If you want do add also %WS_BORDER you need to indicate them all: %WS_CHILD or %WS_VISIBLE or %WS_BORDER
otherwise it will not be %WS_CHILD and %WS_VISIBLE
Ok. Thanks.
Regards, catventure.