• Status Unconfirmed
  • Percent Complete
  • Task Type Bug Report
  • Category Application
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Development
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Koda
Opened by Chris Haslam - 20.05.2011

FS#280 - Graphics styles: some suggestions

SS_LEFTNOWORDWRAP appears in OI but is not, I think, applicable to a control that has no text

SS_SIMPLE seems to do nothing

SS_ETCHEDHORZ reduces the Height to 2, and when the Height is restored in OI, the graphic is not drawn. Indeed, Graphics Editor no longer shows the graphic although Item still shows 1 item.

SS_ETCHEDVERT behaves similarly except that the Width increased to about 630.

These tests were with a graphic that was larger than the control.

Chris Haslam commented on 20.05.2011 03:49

SS_LEFT, SS_RIGHT, SS_CENTER seem to do nothing.

Admin commented on 09.06.2011 10:44

By default text formatting styles looks useless for Graphic, but... this is still static control. How about this example:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Local $Form1 = GUICreate("Form1", 623, 449, 192, 114)
Local $Graphic1 = GUICtrlCreateGraphic(40, 32, 200, 200, BitOR($GUI_SS_DEFAULT_GRAPHIC,$SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 24, 21, 159, 158)
#EndRegion ### END Koda GUI section ###
ControlSetText ($Form1, "", $Graphic1, "This is a text") 
While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
Chris Haslam commented on 10.06.2011 20:33

I have added to documentation | Graphic | Remarks, at least for now,

To add text, call ControlSetText.


It would be possible (and would give SS_LEFT, etc. an obvious reason for being styles for Graphic) to make Koda capable of generating ControlSetText.

Chris Haslam commented on 11.06.2011 04:25

I wrote

SS_SIMPLE seems to do nothing

This is inaccurate: it does do something according to MSDN: limited to one line, never grayed, control is not cleared before updating text (except when combined with SS_NOPREFIX), color can't be changed from default.

I will add SS_SIMPLE to doc for static controls.


Available keyboard shortcuts


Task Details

Task Editing