PDA

View Full Version : UI: Line-Control questions



ReneMiner
22-10-2013, 11:49
How does it work in tB to change behaviour of a Line-control so it gets displayed

-colored (not just black or gray)

-inverted (black background becomes white etc.)

-dotted (or dash-dot-dot etc.)

Attached sample-script, try run and draw some selection-rectangle on the dialog. Nothing else possible anyway.
Using canvas to draw on is no solution because lines shall be visible over later added controls and repainting canvas each frame is too slow also.

I want those lines of my selection-box dotted & inverted - or at least displayed in some eye-biting, good visible color. Setting color (lines 104 to 107) has no visible effect.

Petr Schreiber
22-10-2013, 16:50
Hi Rene,

I think it would be maybe better to take similar route as you can see in SampleScripts/UI/MDI/MDI_Test_DialogEdit.tbasic.

When you look at the SelRectBegin, SelRectDraw, SelRectEnd, it gives you idea how to draw rectangle.
You can see the WIN_CreatePen allows to define pen for drawing, for example like:


hPen = Win_SelectObject(memDC, Win_CreatePen(%PS_dash, 1, Rgb(255, 0, 0)))


Maybe it could be what are you looking for...


Petr

ReneMiner
23-10-2013, 10:00
Nope, I can not read that code.

Petr Schreiber
23-10-2013, 16:51
It is a bit ugly, isn't it :) But I think the solution to your request, even in form of built in functionality, would work similar. I am afraid the LINE control does not offer such a tuning you desire.


Petr