IonicWind Software

IWBasic => General Questions => Topic started by: zaphod on October 26, 2009, 01:29:18 PM

Title: statictext with border
Post by: zaphod on October 26, 2009, 01:29:18 PM
Hello,
How can i create a static text with border or sunken effect ?

Sorry if question already solved.
Newbie in ebasic.
Title: Re: statictext with border
Post by: sapero on October 26, 2009, 02:14:27 PM
Hello zaphod,

Use SS_SUNKEN or @BORDER style:$define SS_SUNKEN 0x1000
CONTROL /*parent window*/w1, /*type*/@STATIC, "static", _
/*position*/100, 100, /*size*/150, 20, /*styles*/SS_SUNKEN, /*id*/6666
Title: Re: statictext with border
Post by: SnarlingSheep on October 26, 2009, 02:24:24 PM
sapero beat me to it, but I'll post my example anyway:
def run:INT
def win:window

const SS_CENTER = 0x1
const SS_RIGHT = 0x2
const SS_SUNKEN = 0x1000

const WS_THICKFRAME = 0x40000
const WS_DLGFRAME = 0x400000

DECLARE IMPORT,GetSysColor(nIndex:INT),UINT

openwindow win,0,0,640,400,@SIZE|@MINBOX|@MAXBOX,0,"Status Demo",&mainwindow

SETWINDOWCOLOR win,GetSysColor(15)

control win,@static,"Testing bordered static style",50,50,500,25,@BORDER|SS_CENTER,1
control win,@static,"Testing sunken static style",50,100,500,25,SS_SUNKEN|SS_CENTER,2
control win,@static,"Testing bordered sunken static styles",50,150,500,25,@BORDER|SS_SUNKEN|SS_CENTER,3
control win,@static,"Testing right static style",50,200,500,25,WS_DLGFRAME|SS_RIGHT,4
control win,@static,"Testing thick frame style",50,250,500,25,WS_THICKFRAME,5

run = 1
waituntil run=0

closewindow win
end

sub mainwindow
select @MESSAGE
case @IDCLOSEWINDOW
run = 0
endselect
return
ENDSUB
Title: Re: statictext with border
Post by: zaphod on October 26, 2009, 02:42:38 PM
Thanx for your responses.
Very appreciated.